Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

update/delete by #45

Closed
normadn opened this issue Dec 12, 2016 · 4 comments
Closed

update/delete by #45

normadn opened this issue Dec 12, 2016 · 4 comments

Comments

@normadn
Copy link

normadn commented Dec 12, 2016

Use case:
My user model has two unique keys. a) GraphQLID b) FacebookId. Would be great to update the User Model directly via the FacebookId without the need to first query the GraphQLID.
Example:

 updateUser(idFb:"12233232", state: MAIN)
{
    state
  }
@timsuchanek
Copy link
Contributor

timsuchanek commented Dec 12, 2016

In the near future we want to add filters to the update mutations, that should cover your use case :)

That would then also cover this use case: https://github.com/graphcool/feature-requests/issues/42

@marktani marktani changed the title updateModel via unique key update/delete by Mar 24, 2017
@marktani
Copy link
Contributor

Same for delete by

@Kaihuang724
Copy link

Use case:

My user node has a relationship with another data node. I want to update the User node's relationship using a (unique) variable other than the ID.

Example where goals is the relationship:

  mutation updateUser($id: ID!, $name: String, $age: Int, $gender: USER_GENDER, $goalsNames: [String!]) {
    updateUser(
      id: $id,
      name: $name,
      age: $age,
      gender: $gender,
      goalsNames: $goalsNames
    ) {
      name,
      goals {
        id,
        name
      }
    }

@marktani
Copy link
Contributor

Closing in favor of https://github.com/graphcool/framework/issues/1267.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants