Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[GraphQL] Add support for expanding the Resource output object #10478

Description

@jptrindade

We can modify GraphQLContribution with a method called get_resource_graphql_output_type_mixin. This method allows extensions to define additional fields that should be present on the Resource output object.

We will then compose the Resource output object from the class we have in core and from all of the extensions that want to add fields to it.

Proposal A: POC Compose a Resource sqlalchemy model and resolve the fields on the extensions

Proposal B: It is possible that this will require extensions to add stuff to the query context since these fields are not present natively in sqlalchemy they need to be calculated in custom resolvers. If that need arises, we can also add a get_context_loaders method to GraphQLContribution and we compose our context from the contributions of all extensions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions