update example to use weather api
This commit is contained in:
@ -1,8 +0,0 @@
|
||||
query Starters {
|
||||
pokemon_pokemons(limit: 12) {
|
||||
results {
|
||||
id
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
22
.wundergraph/operations/Weather.graphql
Normal file
22
.wundergraph/operations/Weather.graphql
Normal file
@ -0,0 +1,22 @@
|
||||
query ($city: String!) {
|
||||
weather_getCityByName(name: $city config: {units: metric}) {
|
||||
coordinates: coord {
|
||||
lat
|
||||
lon
|
||||
}
|
||||
country
|
||||
weather {
|
||||
temperature {
|
||||
actual
|
||||
feelsLike
|
||||
min
|
||||
max
|
||||
}
|
||||
summary {
|
||||
title
|
||||
description
|
||||
icon
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -9,15 +9,15 @@ import {
|
||||
import server from './wundergraph.server';
|
||||
import operations from './wundergraph.operations';
|
||||
|
||||
const pokemonAPI = introspect.graphql({
|
||||
apiNamespace: 'pokemon',
|
||||
url: 'https://graphql-pokeapi.graphcdn.app/',
|
||||
const weather = introspect.graphql({
|
||||
apiNamespace: 'weather',
|
||||
url: 'https://graphql-weather-api.herokuapp.com/',
|
||||
});
|
||||
|
||||
const myApplication = new Application({
|
||||
name: 'app',
|
||||
apis: [
|
||||
pokemonAPI,
|
||||
weather,
|
||||
],
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user