Hello. Thank you for any help you can provide here is a detail of the goal I am trying to achieve, the steps that I have taken to try and achieve this goal, and the error messages that have come along the way.
** I have gone through all of this with the FaunaDB support team, and we are confident it is a porblem with Netlify and not on the Fauna Addon side **
GOAL: To be able to see the FaunaDB (GraphQL) database that was created with netlify functions:create
in the Fauna dashboard
ACTION 1: netlify addons:auth fauna
RESULT:
- The Fauna dashboard did populate with the schema from my Netlify Functions schema
- BUT then on
netlify dev
I get the following error message:- Response with status 500 in 264 ms. ◈ Error during invocation: [ { message: ‘Ref refers to undefined database ‘backend’’, extensions: { code: ‘invalid ref’ } } ]
ACTION 2: because ‘backend’ was undefined I deleted that DB in the newly populated Fauna Dashboard
RESULT:
- When I run
netlify dev
now I get the following error message:- ◈ Error during invocation: [ { message: ‘Invalid database secret.’ } ] Request from ::1: POST /.netlify/functions/backend Response with status 500 in 234 ms.
ACTION 3: netlify addons:list
RESULT:
- | fauna | FaunaDB Cloud | 5d741a8ed6e05ec5f3e7ca35
- | identity | Netlify Identity | 5d76a44c547979017630f3eb
ACTION 4: netlify addons:delete fauna
ACTION 5: netlify addons:create fauna && netlify addons:auth fauna
AND I update my schema.graphql file inside the Fauna Dashboard
RESULT:
- Now again my Fauna database is populated in the Fauna dashboard.
- BUT now the problem is all of my queries are still trying to hit the /.netlify/functions/backend directory that was created in when I followed the old way of
netlify:functions create
- AND when I run
netlify dev
the project is still injecting my old credentials into the site:- ◈ Netlify Dev ◈
- ◈ Injected addon env var: FAUNADB_ADMIN_SECRET
- ◈ Injected addon env var: FAUNADB_SERVER_SECRET
- ◈ Injected addon env var: FAUNADB_CLIENT_SECRET
- ◈ Starting Netlify Dev with gatsby
- Waiting for localhost:8000.
- ◈ Lambda server is listening on 34567
ACTION 6: I deleted the /.netlify/functions/backend directory from my local files. And I even deleted my whole Netlify site. Created a new netlify site from the same git and local directory.
RESULT:
- And now I am getting errors on Netlify Functions and Identity:
MAIN PROBLEM NOW:
How can I get my Fauna DB with the schema populated in the Fauna Dashboard to work with my Netlify site?
netlify functions:create
and netlify addons:auth fauna
do not work together