fix formatting

This commit is contained in:
Nithin Kumar B 2022-11-03 14:24:01 +05:30
parent e1668cb6cd
commit 8e6bd94510
3 changed files with 89 additions and 88 deletions

View File

@ -1,5 +1,5 @@
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
# coordinates: coord {
# lat

View File

@ -5,20 +5,18 @@ import {
EnvironmentVariable,
introspect,
templates,
} from '@wundergraph/sdk';
import server from './wundergraph.server';
import operations from './wundergraph.operations';
} from "@wundergraph/sdk";
import server from "./wundergraph.server";
import operations from "./wundergraph.operations";
const weather = introspect.graphql({
apiNamespace: 'weather',
url: 'https://graphql-weather-api.herokuapp.com/',
apiNamespace: "weather",
url: "https://graphql-weather-api.herokuapp.com/",
});
const myApplication = new Application({
name: 'app',
apis: [
weather,
],
name: "app",
apis: [weather],
});
// configureWunderGraph emits the configuration
@ -38,12 +36,15 @@ configureWunderGraphApplication({
cors: {
...cors.allowAll,
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
'http://localhost:3000',
"http://localhost:3000",
]
: ['http://localhost:3000', new EnvironmentVariable('WG_ALLOWED_ORIGIN')],
: [
"http://localhost:3000",
new EnvironmentVariable("WG_ALLOWED_ORIGIN"),
],
},
dotGraphQLConfig: {
hasDotWunderGraphDirectory: false,

View File

@ -1,5 +1,5 @@
import { configureWunderGraphOperations } from '@wundergraph/sdk';
import type { OperationsConfiguration } from './generated/wundergraph.operations';
import { configureWunderGraphOperations } from "@wundergraph/sdk";
import type { OperationsConfiguration } from "./generated/wundergraph.operations";
export default configureWunderGraphOperations<OperationsConfiguration>({
operations: {