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
I just finished writing a supabase GQL dataprovider. I am experiencing trouble with the dynamic introspectionResult generation. It is erroring out silently, resulting in an introspectionResult with an empty resources array and data provider errors:
Error: Unknown resource players. Make sure it has been declared on your server side schema. Known resources are at buildQuery2 (buildQuery.ts:24:23) at index.ts:183:15 at step (introspection.ts:154:5) at Object.next (introspection.ts:154:5) at fulfilled (introspection.ts:154:5)
Digging into the introspectionResult generation in ra-data-graphql, the introspection query response includes verbose types:
{
"kind": "SCALAR",
"name": "BigFloat",
"fields": null,
"__typename": "BigFloat",
"enumValues": [],
"interfaces": [],
"description": "A high precision floating point value represented as a string",
"inputFields": null,
"possibleTypes": null
}
However, the apollo client seems to be transforming this and my returned schema from the apollo client has a trimmed version of the type objects that only include __typename:
{
__typename: 'BigFloat'
}
My current workaround is to fetch the schema myself using a fetch policy of no-cache and pass that into the data provider init.
Of note, I have never run into this issue with ra-data-graphql-simple or ra-data-graphql-advance. So it's possible this is a supabase integration specific issue, but this seems unrelated to fetch policies.
The text was updated successfully, but these errors were encountered:
react-admin/packages/ra-data-graphql/src/introspection.ts
Line 58 in fcb38f4
I just finished writing a supabase GQL dataprovider. I am experiencing trouble with the dynamic introspectionResult generation. It is erroring out silently, resulting in an introspectionResult with an empty resources array and data provider errors:
Error: Unknown resource players. Make sure it has been declared on your server side schema. Known resources are at buildQuery2 (buildQuery.ts:24:23) at index.ts:183:15 at step (introspection.ts:154:5) at Object.next (introspection.ts:154:5) at fulfilled (introspection.ts:154:5)
Digging into the introspectionResult generation in
ra-data-graphql
, the introspection query response includes verbose types:However, the apollo client seems to be transforming this and my returned schema from the apollo client has a trimmed version of the type objects that only include
__typename
:My current workaround is to fetch the schema myself using a fetch policy of
no-cache
and pass that into the data provider init.Of note, I have never run into this issue with
ra-data-graphql-simple
or ra-data-graphql-advance. So it's possible this is a supabase integration specific issue, but this seems unrelated to fetch policies.The text was updated successfully, but these errors were encountered: