Skip to content

Conditional uses of arguments #199

Closed
@Naoto-Ida

Description

@Naoto-Ida

Is there any support for conditional uses of arguments, i.e. when you have at and by,
but you can only accept an argument one at a time. Or should we write the code ourselves to check if both arguments are available in throw an GraphQLError?

GraphQLObjectType({
    name: 'Event',
    type: new GraphQLList(EventType),
    args: {
        at: {
            type: CoordinateType,
            description: 'Coordinates of the event's venue (approximate).'
        },
        by: {
            type: CoordinateType,
            description: 'Coordinates of the event's venue (exact).'
        },
    }
})

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