2

I'm new to Gatsby and have set up the aws-appsync-gatsby-sample project. The GraphQL data correctly renders in the local site as seen here:

enter image description here

However, I want to use the GraphIQL explorer to learn how to further manipulate the GraphIQL queries but the "explorer" option that Gatsby typically displays is no longer showing. Is it because Im using gatsby-source-graphql?

How to I access the GraphIQL explorer to play with this AppSync API data please? Alternatively, is there another way to access the GraphIQL explorer on my Mac, or online, to access my data?

Thanks for any help.

nipy
  • 5,138
  • 5
  • 31
  • 72

2 Answers2

0

I'm not familiar with gatsby but I'm an engineer on the AppSync team.

As long as you point your GraphiQL app correctly to your AppSync API endpoint, it will work. AppSync GraphQL endpoints are no different than other GraphQL endpoints.

The fastest way to get GraphiQL talking to your AppSync API is:

  1. copy the API URL from the Settings pane in the AWS AppSync Console into GraphiQL. It should look like https://abcdef.appsync-api.us-west-2.amazonaws.com/graphql
  2. In GraphiQL, add a X-API-KEY HTTP request header, and use for value an API key you created from the AppSync Console settings pane. It should start with da2-xxxxxx.
  3. You should now see the documentation explorer populated, proving the introspection request succeeded.
Tinou
  • 5,908
  • 4
  • 21
  • 24
  • I already have GraphIQL working but not the [explorer](https://github.com/OneGraph/graphiql-explorer) Appreciate ether response though. – nipy Apr 10 '20 at 18:19
0

I was able to fix this by downloading the latest version of gatsby

Curtis
  • 63
  • 1
  • 5