silverstripe / silverstripe-graphql

Serves Silverstripe data as GraphQL representations
BSD 3-Clause "New" or "Revised" License
52 stars 61 forks source link

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

Open KallivdH opened 4 months ago

KallivdH commented 4 months ago

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

Possible Solution

Let ModelPageVersionConnection implement the SiteTreeVersionConnection interface

Additional Context

No response

Validations

maxime-rainville commented 4 months ago

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.