Skip to content

Add support of wildcard fields #147

@koistya

Description

@koistya

One use case that comes to mind is form validation, for example:

GraphQL Query

mutation {
  createUser(email: "[email protected]", password: "Passw0rd") {
    state: {
      isValid,
      errors*                   <-- here
    },
    user {
      id,
      email,
      emailVerified
    }
  }
}

GraphQL Response

{
  data: {
    state: {
      isValid: false,
      errors: {
        '': [
          'Failed to create a new user account.'
        ],
        email: [
          'User with this email address ([email protected]) already exists.'
        ]
      },
    },
    user: null
  }
}

Ref #117, graphql/graphql-js#44

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions