Skip to content
New issue

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

Nullable fields in mutations are only made as optional, but not accept Nothing #22

Open
richardriman opened this issue Jan 13, 2023 · 0 comments

Comments

@richardriman
Copy link

Having another problem with the library.

This is completely valid mutation. It allows me to remove coordinator from event.

mutation UpdateEvent {
  updateEvent(input: { id: "Event:1", coordinatorId: null }) {
     ...
  }

But, generated code does not allow me create that mutation, as it requires input value to be specified. In this case it's Graph.Id. There definitely should be Maybe Graph.Id and conditional handling.

coordinatorId : Graph.Id -> UpdateEventInput -> UpdateEventInput
coordinatorId newArg_ inputObj_ =
    GraphQL.Engine.addField
        "coordinatorId"
        "ID"
        (Graph.id.encode newArg_)
        inputObj_

Thx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant