Skip to content

Commit

Permalink
fix(graphql): fix graphql types when no queries are available
Browse files Browse the repository at this point in the history
  • Loading branch information
Frantz Kati committed Dec 27, 2020
1 parent 7b7cfe2 commit 8e5f3c5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/graphql/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,7 @@ ${this.getOrderByQueryForResource(resource, config)}
`
})

const resourcesWithQueryTypes = resources

const resourcesWithQueryTypes = resources.filter(r => !r.isHiddenOnApi() && !r.data.hideOnFetchApi)

if (resourcesWithQueryTypes.length > 0) {
this.schemaString = `${this.schemaString}type Query {${resourcesWithQueryTypes.map(resource => {
Expand Down

0 comments on commit 8e5f3c5

Please sign in to comment.