sikanhe / gqtx

Code-first Typescript GraphQL Server without codegen or metaprogramming
458 stars 13 forks source link

Mutation `fields` signature #43

Closed FedericoBiccheddu closed 3 years ago

FedericoBiccheddu commented 3 years ago

I noticed mutations fields requires a callback, but subscription and query fields not.

https://github.com/sikanhe/gqtx/blob/7cf0d3afa9579e63ed0f32cdc2d09e8790ffd896/src/define.ts#L483

Removing the callback from the public api the callback could be an implementation detail here: https://github.com/sikanhe/gqtx/blob/7cf0d3afa9579e63ed0f32cdc2d09e8790ffd896/src/define.ts#L489

There are reasons that I am missing? In case this is not intended, I can submit a PR.

sikanhe commented 3 years ago

Yea it shouldn't be inconsistent - happy to accept PR here