|
1 | 1 | /* eslint-disable */
|
2 | 2 |
|
3 |
| -import { createApolloMock } from "apollo-typed-documents"; |
| 3 | +import { createApolloMock } from 'apollo-typed-documents'; |
4 | 4 |
|
5 | 5 | const operations = {};
|
6 | 6 |
|
7 | 7 | export default createApolloMock(operations);
|
8 | 8 |
|
9 | 9 | operations.authors = {};
|
10 | 10 | operations.authors.variables = (values = {}, options = {}) => {
|
| 11 | + const __typename = ''; |
11 | 12 | values = (({ }) => ({ }))(values);
|
12 | 13 | return {
|
13 | 14 |
|
14 | 15 | };
|
15 | 16 | }
|
16 | 17 | operations.authors.data = (values = {}, options = {}) => {
|
| 18 | + const __typename = ''; |
17 | 19 | values = (({ authors = null }) => ({ authors }))(values);
|
18 | 20 | return {
|
19 | 21 | authors: (values.authors || []).map(item => ((values = {}, options = {}) => {
|
| 22 | + const __typename = 'Author'; |
20 | 23 | values = (({ id = null, name = null, description = null, books = null }) => ({ id, name, description, books }))(values);
|
21 | 24 | return {
|
22 |
| - id: (values.id === null || values.id === undefined) ? "Author-id" : values.id, |
23 |
| - name: (values.name === null || values.name === undefined) ? "Author-name" : values.name, |
| 25 | + id: (values.id === null || values.id === undefined) ? [__typename, 'id'].filter(v => v).join('-') : values.id, |
| 26 | + name: (values.name === null || values.name === undefined) ? [__typename, 'name'].filter(v => v).join('-') : values.name, |
24 | 27 | description: values.description,
|
25 | 28 | books: (values.books || []).map(item => ((values = {}, options = {}) => {
|
| 29 | + const __typename = 'Book'; |
26 | 30 | values = (({ id = null, title = null }) => ({ id, title }))(values);
|
27 | 31 | return {
|
28 |
| - id: (values.id === null || values.id === undefined) ? "Book-id" : values.id, |
29 |
| - title: (values.title === null || values.title === undefined) ? "Book-title" : values.title, |
30 |
| - ...(options.addTypename ? {__typename: "Book"} : {}) |
| 32 | + id: (values.id === null || values.id === undefined) ? [__typename, 'id'].filter(v => v).join('-') : values.id, |
| 33 | + title: (values.title === null || values.title === undefined) ? [__typename, 'title'].filter(v => v).join('-') : values.title, |
| 34 | + ...(options.addTypename ? { __typename } : {}) |
31 | 35 | };
|
32 | 36 | })(item, options)),
|
33 |
| - ...(options.addTypename ? {__typename: "Author"} : {}) |
| 37 | + ...(options.addTypename ? { __typename } : {}) |
34 | 38 | };
|
35 | 39 | })(item, options))
|
36 | 40 | };
|
37 | 41 | }
|
38 | 42 |
|
39 | 43 | operations.createAuthor = {};
|
40 | 44 | operations.createAuthor.variables = (values = {}, options = {}) => {
|
| 45 | + const __typename = ''; |
41 | 46 | values = (({ input = undefined }) => ({ input }))(values);
|
42 | 47 | return {
|
43 | 48 | input: (AuthorInput)(values.input || undefined, options)
|
44 | 49 | };
|
45 | 50 | }
|
46 | 51 | operations.createAuthor.data = (values = {}, options = {}) => {
|
| 52 | + const __typename = ''; |
47 | 53 | values = (({ createAuthor = null }) => ({ createAuthor }))(values);
|
48 | 54 | return {
|
49 | 55 | createAuthor: ((values = {}, options = {}) => {
|
| 56 | + const __typename = 'Author'; |
50 | 57 | values = (({ id = null, name = null, description = null, books = null }) => ({ id, name, description, books }))(values);
|
51 | 58 | return {
|
52 |
| - id: (values.id === null || values.id === undefined) ? "Author-id" : values.id, |
53 |
| - name: (values.name === null || values.name === undefined) ? "Author-name" : values.name, |
| 59 | + id: (values.id === null || values.id === undefined) ? [__typename, 'id'].filter(v => v).join('-') : values.id, |
| 60 | + name: (values.name === null || values.name === undefined) ? [__typename, 'name'].filter(v => v).join('-') : values.name, |
54 | 61 | description: values.description,
|
55 | 62 | books: (values.books || []).map(item => ((values = {}, options = {}) => {
|
| 63 | + const __typename = 'Book'; |
56 | 64 | values = (({ id = null, title = null }) => ({ id, title }))(values);
|
57 | 65 | return {
|
58 |
| - id: (values.id === null || values.id === undefined) ? "Book-id" : values.id, |
59 |
| - title: (values.title === null || values.title === undefined) ? "Book-title" : values.title, |
60 |
| - ...(options.addTypename ? {__typename: "Book"} : {}) |
| 66 | + id: (values.id === null || values.id === undefined) ? [__typename, 'id'].filter(v => v).join('-') : values.id, |
| 67 | + title: (values.title === null || values.title === undefined) ? [__typename, 'title'].filter(v => v).join('-') : values.title, |
| 68 | + ...(options.addTypename ? { __typename } : {}) |
61 | 69 | };
|
62 | 70 | })(item, options)),
|
63 |
| - ...(options.addTypename ? {__typename: "Author"} : {}) |
| 71 | + ...(options.addTypename ? { __typename } : {}) |
64 | 72 | };
|
65 | 73 | })(values.createAuthor || undefined, options)
|
66 | 74 | };
|
67 | 75 | }
|
68 | 76 |
|
69 | 77 | const BookInput = (values = {}, options = {}) => {
|
| 78 | + const __typename = 'BookInput'; |
70 | 79 | values = (({ title = undefined }) => ({ title }))(values);
|
71 | 80 | return {
|
72 |
| - title: (values.title === null || values.title === undefined) ? "BookInput-title" : values.title |
| 81 | + title: (values.title === null || values.title === undefined) ? [__typename, 'title'].filter(v => v).join('-') : values.title |
73 | 82 | };
|
74 | 83 | }
|
75 | 84 |
|
76 | 85 | const AuthorInput = (values = {}, options = {}) => {
|
| 86 | + const __typename = 'AuthorInput'; |
77 | 87 | values = (({ name = undefined, description = undefined, books = undefined }) => ({ name, description, books }))(values);
|
78 | 88 | return {
|
79 |
| - name: (values.name === null || values.name === undefined) ? "AuthorInput-name" : values.name, |
| 89 | + name: (values.name === null || values.name === undefined) ? [__typename, 'name'].filter(v => v).join('-') : values.name, |
80 | 90 | description: values.description,
|
81 | 91 | books: (values.books || []).map(item => (BookInput)(item, options))
|
82 | 92 | };
|
|
0 commit comments