{
memberships {
owner {
names
}
type
}
}
{
memberships {
...fullMembership
}
}
fragment fullMembership on Membership {
membershipId
owner{
...owner
}
type
}
fragment owner on Person {
id
names
surname
}
query Memberships {
memberships{
...fullMembership
}
}
fragment fullMembership on Membership {
membershipId
owner{
...owner
}
type
}
fragment owner on Person {
id
names
surname
}
query FilteredMemberships {
memberships(filter:{
type:FREE
}){
...fullMembership
}
}
{
membership(membershipId:2){
owner{
names
surname
}
}
}
query Membership($id:Int!) {
membership(membershipId:$id){
...fullMembership
}
}
fragment fullMembership on Membership {
membershipId
owner{
...owner
}
type
}
fragment owner on Person {
id
names
surname
}
and then variable:
{
"id":1
}
query Membership($id:Int!,$withOwner: Boolean!) {
membership(membershipId:$id){
...fullMembership
}
}
fragment fullMembership on Membership {
membershipId
owner @include(if: $withOwner){
...owner
}
type
}
fragment owner on Person {
id
names
surname
}
and then variable:
{
"id": 1,
"withOwner": false
}
query Membership($id:Int!,$withOwner: Boolean!,$noId: Boolean = false) {
membership(membershipId:$id){
...fullMembership
}
}
fragment fullMembership on Membership {
membershipId @skip(if: $noId)
owner @include(if: $withOwner){
...owner
}
type
}
fragment owner on Person {
id @skip(if: $noId)
names
surname
}
and then variable:
{
"id": 1,
"withOwner": true,
"noId": true
}
query Memberships($itemsPerPage:Int!,$pageNumber:Int!) {
memberships(
first:$itemsPerPage,
skip:$pageNumber) {
membershipId
owner{
names
surname
}
type
}
}
and then variables:
{
"itemsPerPage": 1,
"pageNumber": 1
}
increase the pageNumber variable to page
mutation CreateMember {
createMembership(membership: {type:FULL,owner: {names: "Piet",surname:"Pompies"}}) {
membershipId
owner{
id
names
surname
}
type
}
}
mutation CreateMember {
createMembership(membership: {type:FULL,owner: {names: "James",surname:"Small"}}) {
...fullMembership
}
}
fragment fullMembership on Membership {
membershipId
owner{
...owner
}
type
}
fragment owner on Person {
id
names
surname
}
mutation CreateMember($membership: MembershipInput!) {
createMembership(membership:$membership) {
...fullMembership
}
}
fragment fullMembership on Membership {
membershipId
owner{
...owner
}
type
}
fragment owner on Person {
id
names
surname
}
and then variable:
{
"membership": {
"owner": {
"names": "Christina",
"surname": "Storm"
},
"type": "FULL"
}
}
mutation EditMember($membership: MembershipInput!) {
createMembership(membership:$membership) {
...fullMembership
}
}
{
"membership": {
"membershipId": 2,
"owner": {
"names": [
"Charmaine",
"Juliet"
],
"surname": "Krüger"
},
"type": "FULL"
}
}
mutation DeleteMembership($id:Int!){
deleteMembership(membershipId:$id){
...fullMembership
}
}
and then variable:
{
"id":1
}
mutation CreateMember($membership: MembershipInput!) {
createMembership(membership:$membership) {
...fullMembership
}
}
fragment fullMembership on Membership {
membershipId
owner{
...owner
}
type
}
fragment owner on Person {
id
names
surname
}
and then variable:
{
"membership": {
"owner": {
"names": "Christina",
"surname": "S"
},
"type": "FULL"
}
}
{
__schema {
queryType {
name
fields {
name
}
}
mutationType{
name
fields{
name
}
}
subscriptionType {
name
fields{
name
}
}
}
}
{
__type(name: "Membership") {
name
kind
fields {
name
args {
name
}
}
}
}