Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Gateway does not merge Query, Mutation and Subscription properly if extend is not used #23

Open
PacoDu opened this issue Aug 31, 2020 · 4 comments

Comments

@PacoDu
Copy link

PacoDu commented Aug 31, 2020

The gateway doesn't merge services schema correctly if extend is not used.
The following schemas:

type Notification {
  id: ID!
  message: String
}

type Query {
  notifications: [Notification]
}
type User {
  id: ID!
  name: String
}

type Query {
  users: [User]
}

Produces:

directive @external on FIELD_DEFINITION
directive @requires(fields: _FieldSet!) on FIELD_DEFINITION
directive @provides(fields: _FieldSet!) on FIELD_DEFINITION
directive @key(fields: _FieldSet!) on OBJECT | INTERFACE
directive @extends on OBJECT | INTERFACE

scalar _Any
scalar _FieldSet

type User {
  id: ID!
  name: String
}

type Query {
  notifications: [Notification]
}

type Notification {
  id: ID!
  message: String
}

Current workaround: always use extend type Query/Mutation/Subscription for federated services.
Related to: mercurius-js/mercurius#262

@PacoDu PacoDu changed the title Gateway does not merge services schemas correctly Gateway does not merge Query, Mutation and Subscription properly if extend is not used Sep 1, 2020
@mcollina
Copy link
Contributor

mcollina commented Sep 1, 2020

Would you like to send a PR?

@PacoDu
Copy link
Author

PacoDu commented Sep 1, 2020

Would you like to send a PR?

I don't have the time right now to investigate this issue, I'll try to fix the issue later if it hasn't been fixed yet.

mcollina referenced this issue in mercurius-js/mercurius Nov 13, 2020
…emetry (#341)

* doc(opentelemetry): add tracing documentation with zipkin and opentelemetry

* doc(opentelemetry): expose tracer to resolver context

* doc(opentelemetry): move to integrations folder

* doc(opentelemetry): typo

* doc(opentelemetry): switch to @autotelic/fastify-opentelemetry

* doc(opentelemetry): fix invalid example due to #273

* doc(opentelemetry): add information about jitted requests missing the graphql trace
@psteinroe
Copy link

psteinroe commented May 24, 2021

Does anyone has experience with implementing the proposed workaround with nestjs/graphql or type-graphql? I also tried adding it in transformSchema, but the server doesn't start.

Unfortunately, I don't have enough time right now to fix the issue, hence I need the workaround...

@psteinroe
Copy link

For future readers: The workaround was implemented in nestjs-mercurius. PR

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants