Skip to content

Tapioca v0.17.5 doesn't handle typing of output of custom GraphQL Scalars correctly #2337

@joeytepp

Description

@joeytepp

Just noticed what I believe to be a bug when updating to the latest version of the Gem in a project that also uses the graphql-ruby gem and where we have some custom scalar types. While the latest version does a great job of locating the correct type, I'm finding that for input arguments that reference the scalar types, the generated methods in the rbi are always nullable.

I've traced the reason down to this line, and the underlying issue is that the coerce_result of any scalar type has to handle the nil case, but in cases where we have a required input argument the value of the argument will never be null. So the type should only have a T.nilable(...) if the input argument is not required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp-wantedWe support this change, and welcome community contributions for it.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions