File tree 6 files changed +3716
-4601
lines changed
source-nodes/node-actions
6 files changed +3716
-4601
lines changed Original file line number Diff line number Diff line change
1
+ # v2.0.0
2
+
3
+ ## Feat: Gatsby v3 compatibility
4
+
5
+ ** No breaking changes** . Just a version bump and minor tweaks required for ` gatsby@^3.0.0 ` compatibility.
6
+
1
7
# v1.0.0
2
8
3
9
## Feat: writeCompiledQueries utility
Original file line number Diff line number Diff line change 30
30
"@types/fs-extra" : " ^9.0.1" ,
31
31
"@types/jest" : " ^26.0.7" ,
32
32
"@types/node" : " ^14.0.25" ,
33
- "gatsby" : " ^2.23.12 " ,
34
- "graphql" : " ^14.6 .0" ,
33
+ "gatsby" : " ~3.3.0 " ,
34
+ "graphql" : " ^15.4 .0" ,
35
35
"jest" : " ^26.1.0" ,
36
36
"react-dom" : " ^16.13.1" ,
37
37
"rimraf" : " ^3.0.2" ,
38
38
"ts-jest" : " ^26.1.3" ,
39
39
"typescript" : " ^3.9.7"
40
40
},
41
41
"peerDependencies" : {
42
- "gatsby" : " ^2.0.15" ,
43
- "graphql" : " ^14.0.0 || ^15.0.0"
42
+ "gatsby" : " ^3.0.0"
44
43
}
45
44
}
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ export function deleteNodes(
15
15
)
16
16
const node = context . gatsbyApi . getNode ( id )
17
17
if ( node ) {
18
- context . gatsbyApi . actions . deleteNode ( { node } )
18
+ context . gatsbyApi . actions . deleteNode ( node )
19
19
}
20
20
// TODO: find all nodes referencing deleted nodes and update/refetch all of them?
21
21
// Alternatively - soft-delete:
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ export function touchNodesByType(
23
23
24
24
for ( const node of nodes ) {
25
25
if ( ! excludeIds . has ( node . id ) ) {
26
- actions . touchNode ( { nodeId : node . id } )
26
+ actions . touchNode ( node )
27
27
}
28
28
}
29
29
}
Original file line number Diff line number Diff line change 1
1
import { Node , NodePluginArgs } from "gatsby"
2
- import { ComposeFieldConfig } from "graphql-compose"
2
+ import { ObjectTypeComposerFieldConfigDefinition } from "graphql-compose"
3
3
import {
4
4
DocumentNode ,
5
5
ExecutionResult ,
@@ -177,5 +177,7 @@ interface IGatsbyFieldTransformArgs {
177
177
178
178
export interface IGatsbyFieldTransform {
179
179
test : ( args : IGatsbyFieldTransformArgs ) => boolean
180
- transform : ( args : IGatsbyFieldTransformArgs ) => ComposeFieldConfig < any , any >
180
+ transform : (
181
+ args : IGatsbyFieldTransformArgs
182
+ ) => ObjectTypeComposerFieldConfigDefinition < any , any >
181
183
}
You can’t perform that action at this time.
0 commit comments