relate-app / gatsby-source-strapi-graphql

A Gatsby source plugin for building websites using Strapi as a data source
BSD Zero Clause License
32 stars 9 forks source link

Fix query issue for publication state #29

Open pepijn-vanvlaanderen opened 2 years ago

pepijn-vanvlaanderen commented 2 years ago

The publication state argument gives errors on queries for collection types that have the draf system turned off. It seems a false error, since the parameter is actually used in a subquery (in the example for the cases), but not on the main employees query.

Thus I have made some changes to not using an argument, but just directly pusing the publicationState value.

Schermafbeelding 2022-06-29 om 13 08 06

cortopy commented 1 year ago

I was just experiencing this exact same issue. This PR fixed it for me. Thanks!