File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 8383 < script >
8484 const root = ReactDOM . createRoot ( document . getElementById ( 'graphiql' ) ) ;
8585 const fetcher = GraphiQL . createFetcher ( {
86- url : 'https://beta .pokeapi.co/graphql/v1beta ' ,
86+ url : 'https://graphql .pokeapi.co/v1beta2 ' ,
8787 headers : { 'X-Method-Used' : 'graphiql-pokeapi-console' } ,
8888 } ) ;
8989 const explorerPlugin = GraphiQLPluginExplorer . explorerPlugin ( ) ;
9797 confirmCloseTab : function ( ) { return true } ,
9898 defaultQuery : `
9999# Using this tool you can try out GraphQL queries against our API
100- # https://beta .pokeapi.co/graphql/v1beta
100+ # https://graphql .pokeapi.co/v1beta2
101101#
102102# You can then use these queries in your product
103103#
104104# Below a query that fetches and sorts all gen-3 pokemon
105105# and then for each generation counts how many pokemon are present
106106
107107query samplePokeAPIquery {
108- gen3_species: pokemon_v2_pokemonspecies (
109- where: {pokemon_v2_generation : {name: {_eq: "generation-iii"}}}
108+ gen3_species: pokemonspecies (
109+ where: {generation : {name: {_eq: "generation-iii"}}}
110110 order_by: {id: asc}
111111 ) {
112112 name
113113 id
114114 }
115- generations: pokemon_v2_generation {
115+ generations: generation {
116116 name
117- pokemon_species: pokemon_v2_pokemonspecies_aggregate {
117+ pokemon_species: pokemonspecies_aggregate {
118118 aggregate {
119119 count
120120 }
You can’t perform that action at this time.
0 commit comments