1
import { Config } from "apollo-server-core"
2
import { cardByID } from "./cardByID"
3

4 1
const isDev = !!process.env.OFFLINE
5

6 1
const endpoint = `${
7 1
  process.env.OFFLINE ? `http://localhost:1337/` : `${process.env.URL}/`
8 1
}${process.env.NETLIFY ? `.netlify/functions/scryfall-api/` : `dev`}`
9

10 1
export const playground: Config["playground"] = {
11
  settings: {
12
    // @ts-ignore
13
    "schema.polling.enable": isDev,
14
    // @ts-ignore
15
    "schema.polling.interval": 15000
16
  },
17
  tabs: [
18
    {
19
      endpoint,
20
      query: cardByID,
21
      name: `cardByID`,
22
      variables: `{ "id": "f0bb1a5c-0f59-4951-827f-fe9df968232d" }`
23
    }
24
  ]
25
}

Read our documentation on viewing source code .

Loading