Graphql-engine: Bug report: Cannot return null for non-nullable field on subscription_root

Created on 6 Nov 2018  路  9Comments  路  Source: hasura/graphql-engine

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}`)
    ]
  );
} 
question urgent wip

All 9 comments

I think this is related to https://github.com/apollographql/graphql-tools/issues/997

cc @Maxpain177

@revskill10, Did you find a workaround?

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

I could replicate this. Working on a fix.

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

@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.

@0x777 @wawhal Can we close this issue?

Yes. Not related to Hasura.

This issue is closed since it is being tracked at https://github.com/apollographql/graphql-tools/issues/1002.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cpursley picture cpursley  路  3Comments

rikinsk-zz picture rikinsk-zz  路  3Comments

EmrysMyrddin picture EmrysMyrddin  路  3Comments

tirumaraiselvan picture tirumaraiselvan  路  3Comments

jjangga0214 picture jjangga0214  路  3Comments