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

Bug report: Cannot return null for non-nullable field on subscription_root #987

Closed
revskill10 opened this issue Nov 6, 2018 · 9 comments
Assignees
Labels
k/question p/urgent Immediate action required s/wip Status: This issue is a work in progress

Comments

@revskill10
Copy link

I'm using graphql-yoga and use transformSchema to rename root query for a remote schema.
The query works fine. But for subscription, i got the error : Cannot return null for non-nullable field on subscription_root.table_name
The function to rename is

function renameSchema(remoteExecSchema, prefix) {
  return transformSchema(
    remoteExecSchema,
    [
      new RenameTypes((type) => `${prefix}_${type}`),
      new RenameRootFields((operation, name) => `${prefix}_${name}`)
    ]
  );
} 
@revskill10 revskill10 changed the title Bug report: Cannot return null for non-nullable field on subscription Bug report: Cannot return null for non-nullable field on subscription_root Nov 6, 2018
@shahidhk
Copy link
Member

shahidhk commented Nov 6, 2018

I think this is related to ardatan/graphql-tools#997

cc @Maxpain177

@maxpain
Copy link
Contributor

maxpain commented Nov 13, 2018

@revskill10, Did you find a workaround?

@0x777
Copy link
Member

0x777 commented Nov 15, 2018

@wawhal Can we figure out if it is an issue with apollo and send a PR to them if that's the case?

@0x777 0x777 added the p/urgent Immediate action required label Nov 15, 2018
@wawhal
Copy link
Contributor

wawhal commented Nov 15, 2018

I could replicate this. Working on a fix.

@wawhal wawhal added the s/wip Status: This issue is a work in progress label Nov 15, 2018
@wawhal
Copy link
Contributor

wawhal commented Nov 15, 2018

Tracked here. Please add a thumbs up so that it gains priority :-)

@revskill10
Copy link
Author

revskill10 commented Nov 16, 2018

@Maxpain177 Till now, my strategy is to untrack tables which has duplicated name, then i create a view with different name. That's why i created the related issue here, which allows untracking multiple tables at once.

@dsandip
Copy link
Member

dsandip commented Jan 20, 2019

@0x777 @wawhal Can we close this issue?

@wawhal
Copy link
Contributor

wawhal commented Jan 20, 2019

Yes. Not related to Hasura.

@wawhal wawhal closed this as completed Jan 20, 2019
@shahidhk
Copy link
Member

This issue is closed since it is being tracked at ardatan/graphql-tools#1002.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
k/question p/urgent Immediate action required s/wip Status: This issue is a work in progress
Projects
None yet
Development

No branches or pull requests

6 participants