I am using the sample database that comes with Fauna account and trying to query an existing collection managers. I keep getting the error below. Is anything going wrong? This is happening continuously since morning.
An internal server error occurred. Please contact Fauna support.
query getAllManagers {
managers{
data {
firstName
}
}
}
While the demo data (which can be included when you create a new database) does have a managers collection, the demo GraphQL schema does not specify a managers type. You would have to update the schema with a managers type before your query would work.
I’m not sure why you’re getting the “internal server error”. When I run your query against a fresh database that has the demo data, the response is:
You didn’t say how you are running your query. Are you using the GraphQL Playground (in the Dashboard)? If not, do you have the correct GraphQL endpoint specified in your GraphQL client?
Do you mean I should replace the existing schema which comes with the demo data? Do you have the sample schema.gql file for managers that I can use? Also is there any documentation on this?
BTW, I get the same error when querying all the demo collections (customers, managers, orders etc).
Since your screenshot showed a query to the US region group, you might be encountering a networking issue that prevents you from accessing the GraphQL API endpoint for the US region group. To test connectivity, try this:
$ curl https://graphql.us.fauna.com/ping
Up and running!
If you see any other output than Up and running!, the service may not be operational or accessible.
Note that the schema that @ptpaterson provided is the demo schema; it does not include a managers type.
You could add the following lines to the schema and then import the schema into your database: