Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PostgreSql JSON columns with [] at root instead of {} are returned incorrectly #29

Open
AneeshBhatnagar opened this issue Jan 9, 2025 · 0 comments · May be fixed by #30
Open

PostgreSql JSON columns with [] at root instead of {} are returned incorrectly #29

AneeshBhatnagar opened this issue Jan 9, 2025 · 0 comments · May be fixed by #30

Comments

@AneeshBhatnagar
Copy link

Description

When a PostgreSql column of type json or jsonb has data that has an array as the root element, the code here mistakenly assumes it to be an array type and tries to return it back as an array, which fails GraphQl schema validation and errors out.

Steps to Reproduce

  • Use any PostgreSql table with a jsonb column
  • Insert json data which contains an array as the root element for it
  • Add this to the GraphQL query
  • Notice the query fails very quickly with this issue
@AneeshBhatnagar AneeshBhatnagar linked a pull request Jan 10, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant