You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
queryDoesNotWork {
users(ids: ["1", "2"]) { # user servicenameorganization { # organization service with @computed directivenameusers { # user servicename
}
}
}
}
We have two services (User, Organization). Inside the Organization service we want to extend the type User with the field organization. Therefore we have to use the @computed directive. The type returned by the directive (in our case Organization) includes fields that must be resolved by the User service. This does not work and throws following error: Error: Cannot return null for non-nullable field User.name.
To Reproduce Steps to reproduce the behavior:
Open Sandbox and execute the default query named "DoesNotWork" in GraphiQL.
Expected behavior
Nested fields combined with the @computed directive are always resolved correctly.
Environment:
@graphql-tools/schema": "^10.0.2"
@graphql-tools/stitch": "^9.0.3"
@graphql-tools/stitching-directives": "^3.0.0"
NodeJS: v20
The text was updated successfully, but these errors were encountered:
Issue workflow progress
Progress of the issue based on the
Contributor Workflow
Describe the bug
Schema (User Service):
Schema (Organization Service):
Query:
We have two services (User, Organization). Inside the Organization service we want to extend the type
User
with the fieldorganization
. Therefore we have to use the@computed
directive. The type returned by the directive (in our caseOrganization
) includes fields that must be resolved by the User service. This does not work and throws following error:Error: Cannot return null for non-nullable field User.name.
To Reproduce Steps to reproduce the behavior:
Open Sandbox and execute the default query named "DoesNotWork" in GraphiQL.
Expected behavior
Nested fields combined with the
@computed
directive are always resolved correctly.Environment:
@graphql-tools/schema": "^10.0.2"
@graphql-tools/stitch": "^9.0.3"
@graphql-tools/stitching-directives": "^3.0.0"
The text was updated successfully, but these errors were encountered: