Skip to content

Instantly share code, notes, and snippets.

@ferdinandsalis
Last active September 14, 2020 21:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ferdinandsalis/163f279426f7f839ae2f4acefcacf5a7 to your computer and use it in GitHub Desktop.
Save ferdinandsalis/163f279426f7f839ae2f4acefcacf5a7 to your computer and use it in GitHub Desktop.
mutation createClient(client: ClientInput!, organizationId: ID!) {
id
}
mutation loginUser(email: $email, password: $password) {
token
expiresAt
user {
id
name
email
organizations {
id
name
}
}
}
@gugl
Copy link

gugl commented Sep 14, 2020

Würde eher sowas in die Richtung machen:

mutation createClient(input: CreateClientInput!) {
  client {
    ...
  }
}

Und in dem CreateCientInput alles reinpacken was man dabei halt so braucht. Nesting kann man dann ja wenns Sinn macht innen machen.

@gugl
Copy link

gugl commented Sep 14, 2020

Wird eh Zeit, dass wir die api etwas sauberer gestalten bevor wir es übersehen.

@gugl
Copy link

gugl commented Sep 14, 2020

mutation generateUserToken(input: {email: $email, password: $password}) {
  userToken {
    token
    expiresAt
    user {
      id
      email
      organizations {
        id
        name
      }
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment