[Solved] Type Mutation must define one or more fields - compatibility issue with GraphQL 0.12.x
See original GitHub issueI’m submitting a …
- bug report
- feature request
- question
PostGraphQL version: 4.0.0-alpha2.30
Minimal SQL file that can be loaded into a clean database:
(Tried getting this via the --export-schema-graphql flag but got error Error: EISDIR: illegal operation on a directory, open {dir_path} with any directory I tried. However the postgres database uri I’m happy sharing is postgres://graphql:v26ppCS10u7aS68FJfY5EVqa9p6lVb@159.203.124.137:5431/core)
Steps to reproduce:
postgraphile -n 0.0.0.0 -s public -o -a -j -M --append-plugins /postgraphile-plugin-connection-filter/index.js --connection postgres://graphql:v26ppCS10u7aS68FJfY5EVqa9p6lVb@159.203.124.137:5431/core
Current behavior:
Using tag -M when I load in the database I get no schema docs and for any query I run I get:
{
"errors": [
{
"message": "Type Mutation must define one or more fields."
}
]
}
Expected behavior: Get the schema docs just without any ability to run default mutations. Perhaps I misunderstand how the disable default mutations flag works though.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
[Solved] Type Mutation must define one or more fields
[Solved] Type Mutation must define one or more fields - compatibility issue with GraphQL 0.12.x.
Read more >UnhandledPromiseRejectionWar...
UnhandledPromiseRejectionWarning: Error: Type Query must define one or more fields. How can I declare an empty Query? graphql · apollo-server.
Read more >GraphQL schema basics - Apollo GraphQL Docs
A single mutation operation can include multiple top-level fields of the Mutation type. This usually means that the operation will execute multiple back-end ......
Read more >Working Draft - GraphQL Specification
All GraphQL operations must specify their selections down to fields which return scalar values to ensure an unambiguously shaped response.
Read more >GraphQL API style guide - GitLab Docs
This field can only be resolved for one project in any single request. ... Developers should specify higher complexity for fields that cause...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Our current docker image also has to do a pin on a specific version. Check the Dockerfile in the root of postgraphql github.
Take a look at the sed script line. Based on your use case you will have to run this after your git clone but it should be similar
On Mon, Feb 12, 2018 at 10:41 AM Tyler van der Hoeven < notifications@github.com> wrote:
Yeah that wasn’t the solution in the end. I did a hack to fix it - look at the last 2 commits for this file:
https://github.com/graphile/postgraphile/commits/master/scripts/build