mst-gql
mst-gql copied to clipboard
Subscription Generated from Hasura Schema returns no data/is not generated correctly
First - optional params are marked as required:
https://github.com/seanaguinaga/hasra-mst-gql/blob/master/src/pages/Tab1.tsx
after @ts-ignore
Data is fetched correctly as a query.
Switching to a subscription gives us this:
Something must've been interpreted incorrectly by mst-gql when creating models?
https://github.com/seanaguinaga/hasra-mst-gql/blob/master/src/models/RootStore.base.ts
The schema generated by hasura is not ideal - but it should work regardless?
https://github.com/seanaguinaga/hasra-mst-gql/blob/master/schema.graphql
Note: the admin secret is temporary - no important data is on this server/db
Did I make a mistake configuring the web socket connection?
https://github.com/seanaguinaga/hasra-mst-gql/blob/master/src/index.tsx
Regardless of misconfiguration - the typedef/lack of data returned by subscribe is wrong? If I am using this wrong - please let me know!
hi @seanaguinaga! I'll try and take a look at this soon, but we've never used either Hasura or subscriptions in our app so it isn't 100% in my wheelhouse.
The first issue you mention is indeed an issue I hadn't yet run into myself, but I agree that variables should be optional if all its params are optional. I'll open a new issue for that!