-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Figured this out today as i was working through building custom resolvers. If you have a table of all UUIDs/Timestamps then graphql-engine creates a type definition that is empty for the aggregated queries. Due to the empty type def, the schema can no longer be introspected.
To recreate you should be able to just create a table with all UUIDs that has data in it. then user graphcurl to introspect it and it will give you an error of "[Table_name]_avg_order_by fields must be an object with field names as keys or a function which returns such an object." because it is an empty type definition. This should be able to be fixed by using a place holder in the schema or don't generate aggregate type definitions on tables without data that can be aggregated. I worked around this by adding a random column filled with 1s.
This also breaks graphql-tools for custom-resolvers because it relies on introspection.