-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgraphql_flutter.dart
74 lines (69 loc) · 1.93 KB
/
graphql_flutter.dart
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//THIS IS A GENERATED FILE, DO NOT MODIFY. YOUR CHANGES WILL BE REWRITTEN ON NEW GENERATION
//Generated at Mon Jan 25 2021 20:03:27 GMT+0100 (Central European Standard Time)
import 'package:graphql_flutter/graphql_flutter.dart';
class CreatePostMutation {
final String _createPost = """
mutation CreatePost(\$input: PostInput!) {
createPost(input: \$input) {
id
}
createMyPost(input: \$input) {
title
}
}
mutation CreateMyPost(\$input: PostInput!) {
createPost(input: \$input) {
id
}
}
""";
static MutationOptions getQueryOptions({@Deprecated('The "document" option has been deprecated, use "documentNode" instead') String document,
DocumentNode documentNode,
Map<String, dynamic> variables,
FetchPolicy fetchPolicy,
ErrorPolicy errorPolicy,
Map<String, dynamic> context,
OnMutationCompleted onCompleted,
OnMutationUpdate update,
OnError onError,
}) {
return MutationOptions({document: document,
documentNode: gql(_createPost)
variables: variables,
fetchPolicy: fetchPolicy,
errorPolicy: errorPolicy,
context: context,
onCompleted: onCompleted,
update: update,
onError: onError
});
}
}
class GetPostQuery {
final String _getPost = """
query getPost(\$id: ID!) {
getPost(id: \$id) {
id
title
slug
}
}
""";
static QueryOptions getQueryOptions({@Deprecated('The "document" option has been deprecated, use "documentNode" instead') String document,
Map<String, dynamic> variables,
FetchPolicy fetchPolicy,
ErrorPolicy errorPolicy,
Object optimisticResult,
int pollInterval,
Map<String, dynamic> context,
}) {
return QueryOptions({document: document,
documentNode: gql(_getPost)
variables: variables,
fetchPolicy: fetchPolicy,
errorPolicy: errorPolicy,
optimisticResult: optimisticResult,
pollInterval: pollInterval,
context: context});
}
}