@graphql-codegen/typescript-react-query 7.0.4 → 7.0.5-alpha-20260623130305-be0a428d74a338747c4012ef5f71aac7772b2af8
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/cjs/index.js +1 -12
- package/esm/index.js +1 -12
- package/package.json +1 -1
package/cjs/index.js
CHANGED
|
@@ -25,20 +25,9 @@ const plugin = (schema, documents, config) => {
|
|
|
25
25
|
if (visitor.hasOperations) {
|
|
26
26
|
prepend.push(visitor.getFetcherImplementation());
|
|
27
27
|
}
|
|
28
|
-
if (visitor.hasFragments) {
|
|
28
|
+
if (visitor.hasFragments || visitor.hasOperations) {
|
|
29
29
|
content.push(visitor_plugin_common_1.typedDocumentString.template);
|
|
30
30
|
}
|
|
31
|
-
if (visitor.hasOperations) {
|
|
32
|
-
return {
|
|
33
|
-
prepend: [...visitor.getImports(), visitor.getFetcherImplementation()],
|
|
34
|
-
content: [
|
|
35
|
-
'',
|
|
36
|
-
visitor_plugin_common_1.typedDocumentString.template,
|
|
37
|
-
visitor.fragments,
|
|
38
|
-
...visitorResult.definitions.filter(t => typeof t === 'string'),
|
|
39
|
-
].join('\n'),
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
31
|
content.push(visitor.fragments);
|
|
43
32
|
content.push(...visitorResult.definitions.filter(t => typeof t === 'string'));
|
|
44
33
|
return {
|
package/esm/index.js
CHANGED
|
@@ -21,20 +21,9 @@ export const plugin = (schema, documents, config) => {
|
|
|
21
21
|
if (visitor.hasOperations) {
|
|
22
22
|
prepend.push(visitor.getFetcherImplementation());
|
|
23
23
|
}
|
|
24
|
-
if (visitor.hasFragments) {
|
|
24
|
+
if (visitor.hasFragments || visitor.hasOperations) {
|
|
25
25
|
content.push(typedDocumentString.template);
|
|
26
26
|
}
|
|
27
|
-
if (visitor.hasOperations) {
|
|
28
|
-
return {
|
|
29
|
-
prepend: [...visitor.getImports(), visitor.getFetcherImplementation()],
|
|
30
|
-
content: [
|
|
31
|
-
'',
|
|
32
|
-
typedDocumentString.template,
|
|
33
|
-
visitor.fragments,
|
|
34
|
-
...visitorResult.definitions.filter(t => typeof t === 'string'),
|
|
35
|
-
].join('\n'),
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
27
|
content.push(visitor.fragments);
|
|
39
28
|
content.push(...visitorResult.definitions.filter(t => typeof t === 'string'));
|
|
40
29
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-codegen/typescript-react-query",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.5-alpha-20260623130305-be0a428d74a338747c4012ef5f71aac7772b2af8",
|
|
4
4
|
"description": "GraphQL Code Generator plugin for generating a ready-to-use React-Query Hooks based on GraphQL operations",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"
|