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

Error from the example of mutation provided in the documentation #893

Open
Kwadz opened this issue Sep 3, 2019 · 4 comments
Open

Error from the example of mutation provided in the documentation #893

Kwadz opened this issue Sep 3, 2019 · 4 comments

Comments

@Kwadz
Copy link
Contributor

Kwadz commented Sep 3, 2019

Following the documentation, I wanted to use demo queries and mutations provided in
this repository.

After fixing the issue related in joaogarin/mydrupalgql#2, we still have an error while requesting a mutation:

Missing input mapper for argument data.

I think it would be nice having a working example that includes mutations (the examples provided in the graphql module contain queries only). What do you think?

@fubhy
Copy link
Contributor

fubhy commented Sep 3, 2019

Can you upload your current code that is causing this error somewhere so I can have a look?

@Kwadz
Copy link
Contributor Author

Kwadz commented Sep 4, 2019

Sure, I uploaded a repo with the configuration exported in config/sync.

To sum up, I did:

  1. Fresh install of Drupal 8
  2. Add GraphQL v4 and mydrupalgql modules
  3. Add a new server in /admin/config/graphql
  4. Fix the visibility of methods in SdlSchemaMyDrupalGql (put public instead of protected)
  5. Fix the issue ResolverRegistry::__construct() no longer accepts array
  6. Add permissions to anonymous users to "Execute arbitrary requests"
  7. Execute the following request like in the doc:
mutation {
  createArticle(data: {title: "Hello GraphQl 2"}) {
    ... on Article {
      id
      title
    }
  }
}

And get:

Missing input mapper for argument data.

@Kwadz
Copy link
Contributor Author

Kwadz commented Sep 16, 2019

@fubhy, have you been able to reproduce the issue?

@Kwadz
Copy link
Contributor Author

Kwadz commented Sep 25, 2019

Since the joaogarin/mydrupalgql repo seems not to be maintened anymore, I would suggest including the mutation part, when fixed, in the drupal-graphql/graphql/tree/8.x-4.x/examples repo and update the link in the documentation accordingly.

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

4 participants