-
Notifications
You must be signed in to change notification settings - Fork 87
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
GraphQL Array<T> vs T[] inconsistencies #1017
Comments
Here's the PR! #1471.⚡ Sweep Basic Tier: I'm creating this ticket using GPT-4. You have 4 GPT-4 tickets left for the month and 2 for the day. For more GPT-4 tickets, visit our payment portal.
Actions (click)
Install Sweep Configs: Pull Request
Step 1: 🔎 SearchingI found the following snippets in your repository. I will now analyze these snippets and come up with a plan. Some code snippets I looked at (click to expand). If some file is missing from here, you can mention the path in the ticket description.booster/website/docs/03_architecture/06_read-model.mdx Lines 215 to 325 in 8c2328d
Lines 1 to 12 in 8c2328d
booster/packages/framework-integration-tests/src/read-models/products-by-sku.ts Lines 1 to 39 in 8c2328d
booster/packages/framework-integration-tests/src/migrations/entities/Product/schema-versions.ts Lines 1 to 17 in 8c2328d
Lines 1 to 18 in 8c2328d
Step 2: ⌨️ Coding
Create packages/framework-core/src/library/graphql-adapter.ts with contents:
Modify packages/framework-provider-aws/src/library/graphql-adapter.ts with contents:
Create packages/framework-core/test/library/graphql-adapter.test.ts with contents:
Modify packages/framework-provider-aws/test/library/graphql-adapter.test.ts with contents: Step 3: 🔁 Code ReviewI have finished reviewing the code for completeness. I did not find errors for . 🎉 Latest improvements to Sweep:
💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request. |
Bug Report
Current Behavior
A read model that uses
Array<T>
can be queried via GraphQL, while a read model that uses (the semantically identical notation)T[]
will throw the following GraphQL errorJSONObject cannot represent non-object value
✅ this works
❌ this fails with above error when queried via GraphQL
Expected behavior
Both
Array<T>
andT[]
to work and not throw any errors (I assume that in typescript both ways are semantically identical)Additional information
Potentially related/similar issues: #338, #436
Environment
@boostercloud/cli/0.24.2 darwin-x64 node-v14.18.1 ([email protected])
Checklist
packages/framework-core/src/library/graphql-adapter.ts
✅ Commit8394c32
packages/framework-provider-aws/src/library/graphql-adapter.ts
packages/framework-core/test/library/graphql-adapter.test.ts
✅ Commitf77b15e
packages/framework-provider-aws/test/library/graphql-adapter.test.ts
✅ Commit4fde026
The text was updated successfully, but these errors were encountered: