@stonecrop/graphql-client 0.30.0 → 0.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/graphql-client.js +168 -136
- package/dist/graphql-client.js.map +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/package.json +30 -26
- package/dist/graphql_client.tsbuildinfo +0 -1
- package/dist/src/client.d.ts +0 -91
- package/dist/src/client.d.ts.map +0 -1
- package/dist/src/client.js +0 -172
- package/dist/src/index.d.ts +0 -4
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/index.js +0 -1
- package/dist/src/queries.d.ts +0 -23
- package/dist/src/queries.d.ts.map +0 -1
- package/dist/src/queries.js +0 -122
- package/dist/src/types/index.d.ts +0 -14
- package/dist/src/types/index.d.ts.map +0 -1
- package/dist/src/types/index.js +0 -4
- package/src/client.ts +0 -233
- package/src/index.ts +0 -4
- package/src/queries.ts +0 -124
- package/src/types/index.ts +0 -15
package/src/queries.ts
DELETED
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GraphQL query documents sent by {@link StonecropClient} to the middleware.
|
|
3
|
-
*
|
|
4
|
-
* These are the client's half of the wire contract with `@stonecrop/graphql-middleware`.
|
|
5
|
-
* They live here as exported constants (rather than inline in the client methods) so the
|
|
6
|
-
* cross-package contract test can validate the exact strings the client sends against the
|
|
7
|
-
* middleware's published SDL — a field the server drops while a query still selects it must
|
|
8
|
-
* fail CI, not production.
|
|
9
|
-
*
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
export const GET_META_QUERY = `
|
|
13
|
-
query GetMeta($doctype: String!) {
|
|
14
|
-
stonecropMeta(doctype: $doctype) {
|
|
15
|
-
name
|
|
16
|
-
slug
|
|
17
|
-
displayField
|
|
18
|
-
fields {
|
|
19
|
-
kind
|
|
20
|
-
fieldname
|
|
21
|
-
component
|
|
22
|
-
primaryKey
|
|
23
|
-
computed
|
|
24
|
-
language
|
|
25
|
-
doctype
|
|
26
|
-
label
|
|
27
|
-
width
|
|
28
|
-
height
|
|
29
|
-
align
|
|
30
|
-
edit
|
|
31
|
-
mask
|
|
32
|
-
format
|
|
33
|
-
mode
|
|
34
|
-
options
|
|
35
|
-
required
|
|
36
|
-
readOnly
|
|
37
|
-
hidden
|
|
38
|
-
default
|
|
39
|
-
validation
|
|
40
|
-
cardinality
|
|
41
|
-
source
|
|
42
|
-
}
|
|
43
|
-
workflow {
|
|
44
|
-
states
|
|
45
|
-
actions {
|
|
46
|
-
label
|
|
47
|
-
requiredFields
|
|
48
|
-
allowedStates
|
|
49
|
-
nextState
|
|
50
|
-
stateless
|
|
51
|
-
selfTransition
|
|
52
|
-
clientHandler
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
inherits
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
`
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Mutation document for dispatching a workflow action (the server-owned transition).
|
|
62
|
-
* @public
|
|
63
|
-
*/
|
|
64
|
-
export const RUN_ACTION_MUTATION = `
|
|
65
|
-
mutation RunAction($doctype: String!, $action: String!, $args: JSON) {
|
|
66
|
-
stonecropAction(doctype: $doctype, action: $action, args: $args) {
|
|
67
|
-
success
|
|
68
|
-
data
|
|
69
|
-
error
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
`
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Query document for fetching all doctype metadata.
|
|
76
|
-
* @public
|
|
77
|
-
*/
|
|
78
|
-
export const GET_ALL_META_QUERY = `
|
|
79
|
-
query GetAllMeta {
|
|
80
|
-
stonecropAllMeta {
|
|
81
|
-
name
|
|
82
|
-
slug
|
|
83
|
-
displayField
|
|
84
|
-
fields {
|
|
85
|
-
kind
|
|
86
|
-
fieldname
|
|
87
|
-
component
|
|
88
|
-
primaryKey
|
|
89
|
-
computed
|
|
90
|
-
language
|
|
91
|
-
doctype
|
|
92
|
-
label
|
|
93
|
-
width
|
|
94
|
-
height
|
|
95
|
-
align
|
|
96
|
-
edit
|
|
97
|
-
mask
|
|
98
|
-
format
|
|
99
|
-
mode
|
|
100
|
-
options
|
|
101
|
-
required
|
|
102
|
-
readOnly
|
|
103
|
-
hidden
|
|
104
|
-
default
|
|
105
|
-
validation
|
|
106
|
-
cardinality
|
|
107
|
-
source
|
|
108
|
-
}
|
|
109
|
-
workflow {
|
|
110
|
-
states
|
|
111
|
-
actions {
|
|
112
|
-
label
|
|
113
|
-
requiredFields
|
|
114
|
-
allowedStates
|
|
115
|
-
nextState
|
|
116
|
-
stateless
|
|
117
|
-
selfTransition
|
|
118
|
-
clientHandler
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
inherits
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
`
|
package/src/types/index.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file Types for the GraphQL client.
|
|
3
|
-
* @public
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import type { GetRecordResult as SchemaGetRecordResult } from '@stonecrop/schema'
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Result from getRecord - includes the record data and any unknown links requested
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
export interface GetRecordResult extends SchemaGetRecordResult {
|
|
13
|
-
/** Link names that were requested but don't exist in the doctype schema */
|
|
14
|
-
unknownLinks?: string[]
|
|
15
|
-
}
|