Skip to content
This repository was archived by the owner on Mar 10, 2025. It is now read-only.
This repository was archived by the owner on Mar 10, 2025. It is now read-only.

Unable to register custom output object type #57

@jamesdh

Description

@jamesdh

Working through the docs on Type Conversion and Creation I thought it would be fairly straight forward to register a custom output object (non-scalar) type that isn't a persistent entity. However, I'm not sure it's possible given how the Typed trait resolves output types.

https://github.com/grails/gorm-graphql/blob/4143ecd83f6e13f50f81a0e0354ceacde0ea1df2/core/src/main/groovy/org/grails/gorm/graphql/entity/dsl/helpers/Typed.groovy#L55-L72

As you can see in line 55/56, it tries to retrieve it and typecast it as a GraphQLInputType, resulting in...

GroovyCastException: Cannot cast object 'GraphQLObjectType{...}' with class 'graphql.schema.GraphQLObjectType' to class 'graphql.schema.GraphQLInputType'

Mostly just creating this as a reminder to myself to submit a fix, but would appreciate any insights others might have in case I'm missing something obvious.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions