Graphql-engine: Add ability to match uuid to String when creating remote schema relationship

Created on 29 Jul 2020  路  4Comments  路  Source: hasura/graphql-engine

Right now if I have a column with uuid type and I want to pass its value as an argument to remote schema's String field, I'm getting an error

Cannot validate remote relationship because expected type "String", but got "uuid"

But it's technically possible to match uuid to String, because any uuid can be converted to string. Moreover, String is a superclass for any other GraphQL type, so value from any Postgre field could be matched to remote schema's String like this.

remote-joins

Most helpful comment

on the same note matching postgres text columns to graphql ID should be possible as well :)

All 4 comments

on the same note matching postgres text columns to graphql ID should be possible as well :)

Any workaround suggested for uuid -> string mapping?

This is a major showstopper for us, is there any workaround? Or perhaps someone from the graphql-engine project can point us to where something like a mapper could be implemented so that the OpenSource community can put up a PR perhaps? I'll be more than glad to take a stab at it!

This is a major showstopper for us, is there any workaround?

@danazkari Personally, I've migrated Hasura's table from uuid to String, still using it as a primary key.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jjangga0214 picture jjangga0214  路  3Comments

tirumaraiselvan picture tirumaraiselvan  路  3Comments

EmrysMyrddin picture EmrysMyrddin  路  3Comments

sachaarbonel picture sachaarbonel  路  3Comments

bogdansoare picture bogdansoare  路  3Comments