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

GraphQL Schema API Fails with Input Type #8429

Closed
Kalcode opened this issue May 4, 2020 · 0 comments · Fixed by #8527
Closed

GraphQL Schema API Fails with Input Type #8429

Kalcode opened this issue May 4, 2020 · 0 comments · Fixed by #8527

Comments

@Kalcode
Copy link

Kalcode commented May 4, 2020

Describe the bug
GraphQL API doesn't seem to support type (https://graphql.org/learn/schema/#input-types).

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'API TAB'
  2. Click on '+ New API'
  3. Enter information
  4. Schema Type select "GraphQL"
  5. Select Format "GraphQL SDL"
  6. Click "Create API"
  7. Copy and Past SDL below.
  8. Click on "Save"
  9. Click on "Generate Collection"
  10. Name and Click "Generate Collection"

Here I receive the error "Couldn’t generate collection".

Expected behavior
A collection is produced to consume the GraphQL API when using type Input.

Additional context

I used the working example it generates and added the input type parameter instead of name: String!

schema {
  query: Query
  mutation: Mutation
}
input UserInput {
    name: String!
    email: String!
}
type User {
  id: String!
  name: String
}
type Query {
  user (id: String): User
}
type Mutation {
  addUser (input: UserInput): User!
}
@Kalcode Kalcode changed the title GraphQL Schema Fails with "Couldn’t generate collection" GraphQL Schema API Fails with Input Type May 4, 2020
@umeshp7 umeshp7 self-assigned this May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants