这是indexloc提供的服务,不要输入任何密码
Skip to content

Without a column that can be aggregated, all introspections break. #1365

@ghost

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.

Metadata

Metadata

Assignees

Labels

c/serverRelated to serverk/bugSomething isn't workingp/highcandidate for being included in the upcoming sprint

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions