You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
GraphQL does not support the Map type natively: it defines an JSON Object with arbitrary string keys and values of certain type. So avro-schema map type is mapped into a Scalar in our implementation. OTOH, GraphQL allows to pass an argument to any field (including scalars, AFAIU). So we can add an argument(s) that will instruct the library to postprocess a map.
Using the lua-jsonpath library seems to be quite general solution, but it has one disadvantage: we cannot guarantee that a jsonpath expression will not change a shape of a query result. If we change the shape the result will not more fit an original avro-schema. So we need some more specific solution.
We can just list all fields that are need to be shown in a result:
From the other side, aliases already breaks this property: the result is not more guaranteed to match an original avro-schema. Maybe shape of a result should be more or less up to a user. So we can consider jsonpath if it allows to filter inner fields w/o moving then on the upper level. But it seems it don't.
GraphQL does not support the Map type natively: it defines an JSON Object with arbitrary string keys and values of certain type. So avro-schema map type is mapped into a Scalar in our implementation. OTOH, GraphQL allows to pass an argument to any field (including scalars, AFAIU). So we can add an argument(s) that will instruct the library to postprocess a map.
Using the lua-jsonpath library seems to be quite general solution, but it has one disadvantage: we cannot guarantee that a jsonpath expression will not change a shape of a query result. If we change the shape the result will not more fit an original avro-schema. So we need some more specific solution.
We can just list all fields that are need to be shown in a result:
The text was updated successfully, but these errors were encountered: