fetching_data.md
August 10, 2022 ยท View on GitHub
Fetching data
We use Relay for network requests.
Artsy's GraphQL server is Metaphysics.
Tools
You can use GraphiQL for checking out the requests to metaphysics.
In order to set this up, pick the playground of choice (Graphiql, Postman, Insomnia, Altair, etc)
and add the following headers:
Header name: Authorization
Header value: Bearer **secret**,
You can find secret in 1Password if you search for Metaphysics INTROSPECT_TOKEN.
Example request
note that in some of the requests you may need to use something like (first: $some-number-here) (or last) but some requests work without it as well.
Troubleshooting
If you get an anauthorized 401 error visit staging.artsy.net or artsy.net (depending on where you're requesting)
open the console and get the key that is returned from sd.CURRENT_USER.accessToken .
Update this value on X-ACCESS-TOKEN and try again.
