objection-graphql icon indicating copy to clipboard operation
objection-graphql copied to clipboard

Set writeOnly and readOnly jsonSchema's value options

Open amendezcabrera opened this issue 4 years ago • 1 comments

I am using your library to automatically generate the GraphQL Schema but I need to set some values from the jsonSchema as readOnly and writeOnly as shown in their docs. Is this possible? And how can I do it? Thank you

amendezcabrera avatar Nov 13 '19 16:11 amendezcabrera

This can be achieved in the afterGet method:

$afterGet(queryContext) {
    delete this.returning_value;
}

It would be nice to just set the writeOnly parameter to the property but this does the job.

amendezcabrera avatar Nov 14 '19 11:11 amendezcabrera