Skip to content

Hooks are not applied on objects build from InterfaceBuilder and UnionBuilder #294

@dariuszkuc

Description

@dariuszkuc

Library Version
1.0.0-RC2

Describe the bug
willAddGraphQLTypeToSchema and didGenerateGraphQLType schema generator hooks are not applied on GraphQLObjectTypes built from InterfaceBuilder and UnionBuilder.

Hooks are only applied if GraphQL types are build using generic TypeBuilder#graphQLTypeOf method. Both interface and union builders attempt to build their implementing objects by invoking object builder directly which does not apply the hooks.

To Reproduce
See SchemaGeneratorHooksTest.calls hook after generating object type

Expected behavior
willAddGraphQLTypeToSchema and didGenerateGraphQLType hooks are consistently applied on GraphQLObjectTypes generated from InterfaceBuilder and UnionBuilder.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions