Skip to content

[resolvers-composition] Use Namespace-types without depth limit #4609

@Drilmo

Description

@Drilmo

Issue workflow progress

Progress of the issue based on the Contributor Workflow

  • 1. The issue provides a reproduction available on Github, Stackblitz or CodeSandbox

    Make sure to fork this template and run yarn generate in the terminal.

    Please make sure the GraphQL Tools package versions under package.json matches yours.

  • 2. A failing test has been provided
  • 3. A local solution has been provided
  • 4. A pull request is pending review

Describe the bug

When I use namespace-types I can't use resolvers-composition, because the resolver-composition does not allow depth, but only : ${typeName}.${field}

Namespace-types : https://graphql-rules.com/rules/mutation-namespaces

Code line : https://github.com/ardatan/graphql-tools/blob/master/packages/resolvers-composition/src/resolvers-composition.ts#L69

To Reproduce
Steps to reproduce the behavior:

Namespace-types : https://graphql-rules.com/rules/mutation-namespaces

and

https://www.graphql-tools.com/docs/resolvers-composition#supported-path-matcher-format

Expected behavior
Based on the documentation:
Capture d’écran 2022-08-01 à 16 11 05

If namespace-types are possible we should be able to do this kind of thing:

  • Query.User.*
  • Query.User.Group.*
  • Mutation.User.!{createUser, login}

Environment:

  • @graphql-tools/resolvers-composition:

Thank you in advance for your consideration and feedback

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions