Skip to content

Latest commit

 

History

History
35 lines (21 loc) · 1.74 KB

fetching_data.md

File metadata and controls

35 lines (21 loc) · 1.74 KB

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.

Screen Shot 2022-05-24 at 17 17 37

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.

Screen Shot 2022-07-19 at 18 45 57

Screen Shot 2022-07-19 at 18 46 04

Example request

Screen Shot 2022-05-24 at 18 33 10

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.

Screen Shot 2022-07-19 at 19 30 29