Oh yes sorry about that.
You should set the env variable FAUNA_KEY to your Fauna database key. But that is specified in the tutorial.
However, the code sample works seamlessly. You can use it as a reference.
POST /graphql 400 4.578 ms - 1572
api |
api | GraphQLError: Cannot query field "listings" on type "Query".
api |
api |
api | 1 Object.Field
api | C:\Users\christophe\Desktop\Nouveau dossier - Copy\job-board\node_modules\graphql\validation\rules\FieldsOnCorrectTypeRule.js:46
api |
api | 2 Object.enter
api | C:\Users\christophe\Desktop\Nouveau dossier - Copy\job-board\node_modules\graphql\language\visitor.js:323
api |
api | 3 Object.enter
api | C:\Users\christophe\Desktop\Nouveau dossier - Copy\job-board\node_modules\graphql\utilities\TypeInfo.js:370
api |
api | 4 visit
api | C:\Users\christophe\Desktop\Nouveau dossier - Copy\job-board\node_modules\graphql\language\visitor.js:243
api |
api | 5 Object.validate
api | C:\Users\christophe\Desktop\Nouveau dossier - Copy\job-board\node_modules\graphql\validation\validate.js:69
api |
api | 6 validate
api | C:\Users\christophe\Desktop\Nouveau dossier - Copy\job-board\node_modules\apollo-server-core\src\requestPipeline.ts:510
api |
api | 7 anonymous
api | C:\Users\christophe\Desktop\Nouveau dossier - Copy\job-board\node_modules\apollo-server-core\src\requestPipeline.ts:296
api |
api | 8 fulfilled
api | C:\Users\christophe\Desktop\Nouveau dossier - Copy\job-board\node_modules\apollo-server-core\dist\requestPipeline.js:5
api |
Thanks for the heads up. I will take a look at that. But all the Github code is up to date on that.
Also kindly confirm that you imported the schema to your Fauna database.
Alternatively you can follow the tutorial using this repo
github.com/brianraila/rw-fauna
In rw-fauna/api/src/lib/db.js
you changed 'Bearer ' to
Bearer ${process.env.FAUNA_KEY}
Oh yes sorry about that.
You should set the env variable FAUNA_KEY to your Fauna database key. But that is specified in the tutorial.
However, the code sample works seamlessly. You can use it as a reference.
Now i get this error
POST /graphql 400 4.578 ms - 1572
api |
api | GraphQLError: Cannot query field "listings" on type "Query".
api |
api |
api | 1 Object.Field
api | C:\Users\christophe\Desktop\Nouveau dossier - Copy\job-board\node_modules\graphql\validation\rules\FieldsOnCorrectTypeRule.js:46
api |
api | 2 Object.enter
api | C:\Users\christophe\Desktop\Nouveau dossier - Copy\job-board\node_modules\graphql\language\visitor.js:323
api |
api | 3 Object.enter
api | C:\Users\christophe\Desktop\Nouveau dossier - Copy\job-board\node_modules\graphql\utilities\TypeInfo.js:370
api |
api | 4 visit
api | C:\Users\christophe\Desktop\Nouveau dossier - Copy\job-board\node_modules\graphql\language\visitor.js:243
api |
api | 5 Object.validate
api | C:\Users\christophe\Desktop\Nouveau dossier - Copy\job-board\node_modules\graphql\validation\validate.js:69
api |
api | 6 validate
api | C:\Users\christophe\Desktop\Nouveau dossier - Copy\job-board\node_modules\apollo-server-core\src\requestPipeline.ts:510
api |
api | 7 anonymous
api | C:\Users\christophe\Desktop\Nouveau dossier - Copy\job-board\node_modules\apollo-server-core\src\requestPipeline.ts:296
api |
api | 8 fulfilled
api | C:\Users\christophe\Desktop\Nouveau dossier - Copy\job-board\node_modules\apollo-server-core\dist\requestPipeline.js:5
api |
Did you add the rw-fauna/api/src/graphql/listings.sdl.js file?
And you missed a } on the second mutation
Thanks for the heads up. I will take a look at that. But all the Github code is up to date on that.
Also kindly confirm that you imported the schema to your Fauna database.
I imported the schema and the github code works.
Its just that i can't run it locally.
What exactly is the issue now?