aboutsummaryrefslogtreecommitdiff
path: root/playground/src/App.svelte
blob: 82a8c9d984b9017931f5d003729d3f2b28be4203 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<script lang="ts">
  /*** IMPORT ------------------------------------------- ***/

  import { createHttpFetcher } from "../../source/library/index.ts";
  import GraphiQL from "../../source/library/GraphiQL.svelte";

  /*** UTILITY ------------------------------------------ ***/

  const fetcher = createHttpFetcher({
    url: "https://countries.trevorblades.com/"
  });

  const initialQuery = `query Countries {
  countries {
    code
    name
    emoji
  }
}
`;
</script>

<GraphiQL {fetcher} {initialQuery}/>