Given a GraphQL schema and a query/mutation defined using gql we should be able to infer the type of the response and variables (if any are required). Eventually, this could evolve in a plugin architecture for the type system. The key aspect is that the plugin is provide an inferred type based on a string. A more complicated plugin architecture would provide a way for it to also generate a set of constraints for any interpolated values. It could return these constraints in the form of a custom TFun for each call since the number of params would have to match the number of interpolated values.
Given a GraphQL schema and a query/mutation defined using
gql
we should be able to infer the type of the response and variables (if any are required). Eventually, this could evolve in a plugin architecture for the type system. The key aspect is that the plugin is provide an inferred type based on a string. A more complicated plugin architecture would provide a way for it to also generate a set of constraints for any interpolated values. It could return these constraints in the form of a customTFun
for each call since the number of params would have to match the number of interpolated values.