Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Put secretKey inside CreateUserInput? #52

Open
Labels
@lorensr

Description

We say it's best practice to use a single input type as an argument, and then we do this:

type Mutation {
 createUser(user: CreateUserInput!, secretKey: String!): User
}

I created it that way because secretKey felt like something out of band, like you'd put it in a header, except it's more convenient to be an argument given it's only used in this one resolver. Is that a good reason, in which case we could add an explanation, or should we just move it inside the input object like this?

input CreateUserInput {
 firstName: String!
 lastName: String!
 username: String!
 email: String!
 authId: String!
 secretKey: String!
}

Thanks to @Borales for asking

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /