fix formatting
This commit is contained in:
parent
e1668cb6cd
commit
8e6bd94510
@ -1,10 +1,10 @@
|
|||||||
query ($city: String!) {
|
query ($city: String!) {
|
||||||
weather_getCityByName(name: $city config: {units: metric}) {
|
weather_getCityByName(name: $city, config: { units: metric }) {
|
||||||
# remove the comments to add the coordinates to the query
|
# remove the comments to add the coordinates to the query
|
||||||
# coordinates: coord {
|
# coordinates: coord {
|
||||||
# lat
|
# lat
|
||||||
# lon
|
# lon
|
||||||
# }
|
# }
|
||||||
country
|
country
|
||||||
weather {
|
weather {
|
||||||
temperature {
|
temperature {
|
||||||
|
@ -5,20 +5,18 @@ import {
|
|||||||
EnvironmentVariable,
|
EnvironmentVariable,
|
||||||
introspect,
|
introspect,
|
||||||
templates,
|
templates,
|
||||||
} from '@wundergraph/sdk';
|
} from "@wundergraph/sdk";
|
||||||
import server from './wundergraph.server';
|
import server from "./wundergraph.server";
|
||||||
import operations from './wundergraph.operations';
|
import operations from "./wundergraph.operations";
|
||||||
|
|
||||||
const weather = introspect.graphql({
|
const weather = introspect.graphql({
|
||||||
apiNamespace: 'weather',
|
apiNamespace: "weather",
|
||||||
url: 'https://graphql-weather-api.herokuapp.com/',
|
url: "https://graphql-weather-api.herokuapp.com/",
|
||||||
});
|
});
|
||||||
|
|
||||||
const myApplication = new Application({
|
const myApplication = new Application({
|
||||||
name: 'app',
|
name: "app",
|
||||||
apis: [
|
apis: [weather],
|
||||||
weather,
|
|
||||||
],
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// configureWunderGraph emits the configuration
|
// configureWunderGraph emits the configuration
|
||||||
@ -38,12 +36,15 @@ configureWunderGraphApplication({
|
|||||||
cors: {
|
cors: {
|
||||||
...cors.allowAll,
|
...cors.allowAll,
|
||||||
allowedOrigins:
|
allowedOrigins:
|
||||||
process.env.NODE_ENV === 'production'
|
process.env.NODE_ENV === "production"
|
||||||
? [
|
? [
|
||||||
// change this before deploying to production to the actual domain where you're deploying your app
|
// change this before deploying to production to the actual domain where you're deploying your app
|
||||||
'http://localhost:3000',
|
"http://localhost:3000",
|
||||||
]
|
]
|
||||||
: ['http://localhost:3000', new EnvironmentVariable('WG_ALLOWED_ORIGIN')],
|
: [
|
||||||
|
"http://localhost:3000",
|
||||||
|
new EnvironmentVariable("WG_ALLOWED_ORIGIN"),
|
||||||
|
],
|
||||||
},
|
},
|
||||||
dotGraphQLConfig: {
|
dotGraphQLConfig: {
|
||||||
hasDotWunderGraphDirectory: false,
|
hasDotWunderGraphDirectory: false,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { configureWunderGraphOperations } from '@wundergraph/sdk';
|
import { configureWunderGraphOperations } from "@wundergraph/sdk";
|
||||||
import type { OperationsConfiguration } from './generated/wundergraph.operations';
|
import type { OperationsConfiguration } from "./generated/wundergraph.operations";
|
||||||
|
|
||||||
export default configureWunderGraphOperations<OperationsConfiguration>({
|
export default configureWunderGraphOperations<OperationsConfiguration>({
|
||||||
operations: {
|
operations: {
|
||||||
|
Loading…
Reference in New Issue
Block a user