Boa tarde, não consegui ainda rodar o npm start, da um erro:
Meu index.js:
const { Apolloserver } = require('apollo-server')
const userSchema = require ('./user/schema/user.graphql')
const users = [
{
nome: "Ana",
ativo: true
},
{
nome:"Marcia",
ativo: false
}
]
const typeDefs = [userSchema]
const resolvers = {}
const server = new Apolloserver( { typeDefs, resolvers } )
Meu user.graphql:
const { gql } = require('apollo-server')
const userSchema = gql `
type User {
nome: String!
ativo: Boolean!
email: String
}
`
module.exports = userSchema
Meu package.json:
{
"name": "roteiro",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "nodemon -e js,json,graphql ./api/index.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/alura-cursos/1922-graphql.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/alura-cursos/1922-graphql/issues"
},
"homepage": "https://github.com/alura-cursos/1922-graphql#readme",
"dependencies": {
"json-server": "^0.16.1",
"nodemon": "^2.0.4"
}
}