Graphql-engine: customize generated field name for array relationships?

Created on 23 Oct 2019  路  2Comments  路  Source: hasura/graphql-engine

Thanks for all your work on beta 8, rename column is incredibly useful!

However, I am still facing some edge cases. For example, I have two schema: listing and listing snapshot, listing have many snapshots , hence I add an array relation on listing. Is there anyway to customize generated array relationship column name?

image

image

server enhancement high

Most helpful comment

Hi @xiaoyu-tamu, We're planning to support customising generated aggregate field for array relationships soon. :slightly_smiling_face:

All 2 comments

Hi @xiaoyu-tamu, We're planning to support customising generated aggregate field for array relationships soon. :slightly_smiling_face:

I would really like to see this feature implemented.
Through custom root fields and columns I have been able to make my gql queries and resulting objects be perfectly aligned with JavaScript/TypeScript object notation standards.

I think this would really improve the feeling of consistency across all queries, as it is (for what I've seen so far), the only name we can't freely update.

We can, for the time being, rename the aggregate field directly in the query, but I think this would be a great feature to add.

Thanks.

Was this page helpful?
0 / 5 - 0 ratings