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

Incorrect example in docs (perhaps) #16

Closed
ruslankrivoshein opened this issue Nov 7, 2019 · 3 comments
Closed

Incorrect example in docs (perhaps) #16

ruslankrivoshein opened this issue Nov 7, 2019 · 3 comments

Comments

@ruslankrivoshein
Copy link
Contributor

I've tried to use example from here, for instance:

{
  protected(message: "hello", token: "my access token")
}

but I've got

{
  "errors": [
    {
      "message": "Field \"protected\" of type \"ProtectedUnion\" must have a sub selection.",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ]
    },
    {
      "message": "Unknown argument \"message\" on field \"protected\" of type \"Query\".",
      "locations": [
        {
          "line": 2,
          "column": 13
        }
      ]
    }
  ]
}

Working case I was able to achieve only with query:

{
  protected(token: "my access token") {
    ... on MessageField {
      message
    }
  }
}

Also I've managed to make the protected mutation with

mutation {
  protected(token: "my access token") {
    message {
      ... on MessageField {
        message
      }
    }
  }
}

I don’t know what it is connected with, but if it's now the valid way, it should be reflected in docs. Last case especially :)

@rscarrera27
Copy link
Owner

Thanks for issue. I'll take a look

@rscarrera27
Copy link
Owner

rscarrera27 commented Nov 11, 2019

Thanks @ruslankrivoshein

I checked my test codes and it seems you're right. could you make any PR for docs?

@ruslankrivoshein
Copy link
Contributor Author

Yes, willingly :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants