update example to use weather api

This commit is contained in:
Jens Neuse
2022-11-02 18:49:31 +01:00
parent b8e8c5e29c
commit 1887dccdf5
5 changed files with 5343 additions and 15 deletions

View File

@ -1,8 +0,0 @@
query Starters {
pokemon_pokemons(limit: 12) {
results {
id
name
}
}
}

View 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
}
}
}
}

View File

@ -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,
],
});