Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Insert empty Subscription type definition #212

Open
wants to merge 4 commits into
base: version-0.x
Choose a base branch
from

Conversation

Chase-C
Copy link
Contributor

@Chase-C Chase-C commented Oct 6, 2020

Fixes the issue I brought up in #4102

Originally at: apollographql/apollo-server#4148

@Chase-C
Copy link
Contributor Author

Chase-C commented Oct 16, 2020

@abernix Is there a way to rerun the checks without pushing a new commit? It looks like the test runner itself failed during initialization.

@Chase-C
Copy link
Contributor Author

Chase-C commented Oct 28, 2020

@abernix Hey, I don't want to bug you but I would like to get this merged in or rejected. Thanks!

@Chase-C
Copy link
Contributor Author

Chase-C commented Nov 17, 2020

@trevor-scheer Could I get some eyes on this? It's pretty minor and I'd like to close it.

@kauanschumacher
Copy link

Hello guys!
We are starting to deploy GraphQL Subscriptions to our services, but this layer of federation is causing problems with the Subscription.

The error is:

Subscription -> Subscription is an extension type, but Subscription is not defined in any service

Debugging the Apollo Federation packages, I ended up arriving at the same solution as this PR.
Can any of the maintainers pay attention to this one-off correction?

@@ -58,6 +58,12 @@ const EmptyMutationDefinition = {
fields: [],
serviceName: null,
};
const EmptySubscriptionDefinition = {
kind: Kind.OBJECT_TYPE_DEFINITION,
name: { kind: Kind.NAME, value: 'Subscription' },

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use a constant here?
Like this:

name: { kind: Kind.NAME, value: defaultRootOperationNameLookup.subscription },

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Chase-C can I help you with this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Be my guest. I tried making the change you suggested, but I'm not sure it's possible to push new commits to this branch without creating an entirely new PR (this one was migrated from the apollo-server project).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried here, and really need create a new PR with fork. Do you want to create there? Or do I create here?

@kauanschumacher
Copy link

@abernix can you help us with this PR?

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

Successfully merging this pull request may close these issues.

3 participants