Draft
Conversation
d4149a8 to
8f38d66
Compare
BCerki
commented
Mar 1, 2022
Comment on lines
+15
to
+25
| query AppQuery { | ||
| allTodos { | ||
| nodes { | ||
| id, | ||
| task, | ||
| completed, | ||
| dateCreated, | ||
| dateUpdated | ||
| } | ||
| } | ||
| } |
Author
There was a problem hiding this comment.
At first I tried copy/pasting the query I made in graphiql, but I got errors and ended up tweaking to this. Should copy/pasted graphiql queries work, or is it normal to use a slightly different format for Relay?
There was a problem hiding this comment.
Other than Relay having requirements when it comes to query/mutation/fragment naming conventions, they should work the same. What errors did you have?
Author
There was a problem hiding this comment.
I must have tried it before troubleshooting babel because it's working now. Thanks!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Notes to self:
To start Postgraphile, run
npx postgraphile -c todo_app -s todo_app --watch --enhance-graphiql --cors --classic-ids--corsfixes the cors errors--classic-idsfixes "Uncaught Invariant Violation: RelayResponseNormalizer: Expected id of elements of fieldnodesto be strings."To make
schema.graphql, runpostgraphile -X -c postgres://localhost/your_db -s your_schema --export-schema-graphql schema/schema.graphql --export-schema-json schema/schema.json --classic-ids --sort-exportIn addition to the Relay docs, see https://create-react-app.dev/docs/adding-relay/