Skip to content
This repository has been archived by the owner on Jul 6, 2020. It is now read-only.

Add populate exchange #120

Merged
merged 6 commits into from
Dec 3, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 114 additions & 0 deletions src/__snapshots__/populate.test.ts.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`on (query w/ fragment) -> mutation mutation query matches snapshot 1`] = `
"mutation MyMutation {
addTodo {
...Todo_PopulateFragment_0
}
}

fragment Todo_PopulateFragment_0 on Todo {
...TodoFragment
}

fragment TodoFragment on Todo {
id
text
}
"
`;

exports[`on (query w/ unused fragment) -> mutation mutation query matches snapshot 1`] = `
"mutation MyMutation {
addTodo {
...Todo_PopulateFragment_0
}
}

fragment Todo_PopulateFragment_0 on Todo {
id
text
}
"
`;

exports[`on mutation mutation query matches snapshot 1`] = `
"mutation MyMutation {
addTodo {
__typename
}
}
"
`;

exports[`on query -> (mutation w/ interface return type) mutation query matches snapshot 1`] = `
"mutation MyMutation {
removeTodo {
...Todo_PopulateFragment_0
...User_PopulateFragment_0
}
}

fragment Todo_PopulateFragment_0 on Todo {
id
name
}

fragment User_PopulateFragment_0 on User {
id
text
}
"
`;

exports[`on query -> (mutation w/ union return type) mutation query matches snapshot 1`] = `
"mutation MyMutation {
updateTodo {
...User_PopulateFragment_0
...Todo_PopulateFragment_0
}
}

fragment User_PopulateFragment_0 on User {
id
text
}

fragment Todo_PopulateFragment_0 on Todo {
id
name
}
"
`;

exports[`on query -> mutation mutation query matches snapshot 1`] = `
"mutation MyMutation {
addTodo {
...Todo_PopulateFragment_0
...Todo_PopulateFragment_1
}
}

fragment Todo_PopulateFragment_0 on Todo {
id
text
creator {
id
name
}
}

fragment Todo_PopulateFragment_1 on Todo {
text
}
"
`;

exports[`on query -> teardown -> mutation mutation query matches snapshot 1`] = `
"mutation MyMutation {
addTodo {
__typename
}
}
"
`;
Loading