Skip to content

Latest commit

 

History

History

exercise4

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Exercise 4

Fix the urls.py: exercise4.schema.schema

Query with Arguments and add custom fields

  1. Query/Field Arguments
  • Find all members in SocialClub's starting with a specified letter (optional filter)
  • Find all socialClubs with at least x members (optional filter)
  1. Mutation
  • Finalize the create or update mutation
  1. Extra if you are really quick: Is it possible to mock/fake some Product data? Can you also mock/fake SocialClub data?

Example:

query SocialClubMembersStartingWithA {
  socialClubs {
    id
    name
    members(startsWith: "a") {
      id
      firstName
      lastName
    }
  }
}

query SocialClubWithAtLeast5Members {
  socialClubs(minMemberCount: 5) {
    name
    id
  }
}

mutation CreateProduct {
  createOrUpdateProduct(
    inp: {pk: 1, name: "Product 1", socialClubId: 5, price: 50, quality: GOOD}
  ) {
    id
    name
    price
    quality
    socialClub {
      id
      name
    }
  }
}

TODO