Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a versioned GraphQL schema as a Hasura remote schema. #579

Open
2 tasks done
KallivdH opened this issue Apr 3, 2024 · 1 comment
Open
2 tasks done

Adding a versioned GraphQL schema as a Hasura remote schema. #579

KallivdH opened this issue Apr 3, 2024 · 1 comment

Comments

@KallivdH
Copy link

KallivdH commented Apr 3, 2024

Module version(s) affected

5.1.3

Description

I am currently testing on a project in Hasura and thought it would be interesting to add a SilverStripe GraphQL scheme. Unfortunately, I get an error when I do this:

The type of Object field 'SiteTree'."versions" (ModelPageVersionConnection) is not the same type/sub type of Interface field 'SiteTreeInterface'."versions" (SiteTreeVersionConnection)

I did manage to add the schema when versioning is disabled. Does anyone have any idea what it could be due to. Unfortunately, I am not getting any wiser from the generated schema....

How to reproduce

  • Run a Hasura instance on your pc via Docker.
  • Run a SilverStripe instance on your pc.
  • Make sure that the GraphQL endpoint is reachable.
  • Make sure versioning is enabled/installed for models in the schema.
  • Add the SilverStripe GraphQL endpoint as a remote schema in hasura.

Possible Solution

Let ModelPageVersionConnection implement the SiteTreeVersionConnection interface

Additional Context

No response

Validations

  • Check that there isn't already an issue that reports the same bug
  • Double check that your reproduction steps work in a fresh installation of silverstripe/installer (with any code examples you've provided)
@maxime-rainville
Copy link
Contributor

From the error you provided, it doesn't look like the issue you are having is specific to Hasura.

Can you provide the definition used to create your GraphQL schema and provide a query that replicate the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants