Vincit / objection-graphql

GraphQL schema generator for objection.js
MIT License
307 stars 35 forks source link

Is there any way to implement resolvers in the jsonSchema? #85

Open jseb16 opened 5 years ago

jseb16 commented 5 years ago

` dbObj = { name: 'john' address: { prop w spaces 1: '0', prop w spaces 2: '1' } }

jsonSchema = { name: {type: string }, addres: { type: object, properties { propWSpaces1: {type: string, resolve: (parent) => parent['prop w spaces 1']} propWSpaces2: {type: string, resolve: (parent) => parent['prop w spaces 2']} } } } `

This is what I am trying to accomplish, however the resolve is either not recognized when the GraphQl schema is generated or Im missing something important on implementing resolvers correctly while using objection-graphql.

any ideas?