We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm following the readme example with my already created model:
const Model = require('../model') class File extends Model { static get tableName() { return 'files' } static jsonSchema() { return { type: 'object', require: ['name'], properties: { id: { type: 'integer' }, name: { type: 'string' }, path: { type: 'string' }, description: { type: 'string' } } } } } module.exports = File
This is how I'm setting up the GraphQL:
const { builder } = require('objection-graphql') const graphql = require('express-graphql') const file = require('../models/file') const schema = builder() .model(file) .build() app.use('/graphql', graphql({ schema: schema, graphiql: true }))
When I run this on graphiQL:
{ Files(orderBy: id) { name } }
this is what I got:
{ "errors": [ { "message": "Enum type FilesPropertiesEnum must define one or more values.\n\nType Files must define one or more fields." } ] }
What I'm doing wrong?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm following the readme example with my already created model:
This is how I'm setting up the GraphQL:
When I run this on graphiQL:
this is what I got:
What I'm doing wrong?
The text was updated successfully, but these errors were encountered: