diff options
Diffstat (limited to 'playground/src/App.svelte')
| -rw-r--r-- | playground/src/App.svelte | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/playground/src/App.svelte b/playground/src/App.svelte index dc4f0a5..350f956 100644 --- a/playground/src/App.svelte +++ b/playground/src/App.svelte @@ -1,24 +1,33 @@ <script lang="ts"> /*** IMPORT ------------------------------------------- ***/ - import { createHttpFetcher } from "../../source/library/index.ts"; + import { createHttpFetcher, lightTheme } from "../../source/library/index.ts"; import GraphiQL from "../../source/library/GraphiQL.svelte"; /*** UTILITY ------------------------------------------ ***/ const fetcher = createHttpFetcher({ url: "https://graphql.pokeapi.co/v1beta2" - // url: "https://countries.trevorblades.com/" }); - const initialQuery = `query Countries { - countries { - code - name - emoji - } -} -`; + const initialQuery = ` + query best_grass_poison_pokemons { + pokemon: pokemon( + where: {_and: [{pokemontypes: {type: {name: {_eq: "grass"}}}}, {pokemontypes: {type: {name: {_eq: "poison"}}}}]} + order_by: {pokemonstats_aggregate: {sum: {base_stat: desc}}} + limit: 3 + ) { + name + stats: pokemonstats_aggregate(order_by: {}) { + aggregate { + sum { + base_stat + } + } + } + } + } + `; </script> -<GraphiQL {fetcher} {initialQuery}/> +<GraphiQL {fetcher} {initialQuery} theme={lightTheme}/> |