hasura/learn-graphql

Tutorial text about GraphQL endpoint being open is incorrect

heysc0tt opened this issue · 1 comments

Before we do that, we need to secure our endpoint with an admin secret. Right now, the GraphQL endpoint is open and anybody can query and manage the data. [Read docs](https://hasura.io/docs/latest/graphql/cloud/projects/secure/#adding-an-admin-secret) on how to add an admin secret to a Hasura Cloud project.

Text states that:

Before we do that, we need to secure our endpoint with an admin secret. Right now, the GraphQL endpoint is open and anybody can query and manage the data.

This seems misleading/incorrect as the new endpoint is created with a generated admin secret already as stated here:
https://hasura.io/docs/latest/graphql/cloud/projects/secure/#adding-an-admin-secret

To make sure that your GraphQL endpoint is not publicly accessible, a randomly generated admin secret key is added by default to your project at the time of project creation.

@heysc0tt - Thanks for pointing this out. I have fixed it in this commit. Hasura Cloud auto-generates admin secret for every project and hence the above note is not valid anymore, as you mentioned.