File size: 592 Bytes
2b06d1d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from graphene.test import Client

from ..data import setup
from ..schema import schema

setup()

client = Client(schema)


def test_mutations(snapshot):
    query = """
    mutation MyMutation {
      introduceShip(input:{clientMutationId:"abc", shipName: "Peter", factionId: "1"}) {
        ship {
          id
          name
        }
        faction {
          name
          ships {
            edges {
              node {
                id
                name
              }
            }
          }
        }
      }
    }
    """
    snapshot.assert_match(client.execute(query))