You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.
app.listen(3000, ()=>console.log("Server up and running at Port 3000"));`
but I am getting error of
pretty = optionsData.pretty ?? false;
^
SyntaxError: Unexpected token '?'
at wrapSafe (internal/modules/cjs/loader.js:1054:16)
at Module._compile (internal/modules/cjs/loader.js:1102:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object. (C:\Users\User\Desktop\Graphql-FullStack\index.js:3:21)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
I installed express-graphql of version 0.1.0.
Now what should I do??
The text was updated successfully, but these errors were encountered:
Here I am trying to creating Graphql Schema
Code=>
`const express = require('express');
const graphqlHttp = require("express-graphql")
const { buildSchema } = require('graphql');
const app = express();
app.use(express.json());
app.use(
'/graphql',
graphqlHttp({
schema: buildSchema(`
type RootQuery {
events: [String!]!
}
})
);
app.listen(3000, ()=>console.log("Server up and running at Port 3000"));`
but I am getting error of
SyntaxError: Unexpected token '?'
at wrapSafe (internal/modules/cjs/loader.js:1054:16)
at Module._compile (internal/modules/cjs/loader.js:1102:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object. (C:\Users\User\Desktop\Graphql-FullStack\index.js:3:21)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
I installed express-graphql of version 0.1.0.
Now what should I do??
The text was updated successfully, but these errors were encountered: