@lewebsimple/nuxt-graphql 0.6.16 → 0.6.17
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/module.json +1 -1
- package/dist/module.mjs +3 -3
- package/dist/runtime/app/composables/useGraphQLCache.client.d.ts +1 -1
- package/dist/runtime/app/composables/useGraphQLLoadMore.d.ts +2 -2
- package/dist/runtime/app/composables/useGraphQLMutation.d.ts +1 -1
- package/dist/runtime/app/plugins/execute-graphql.d.ts +1 -5
- package/dist/runtime/app/plugins/graphql-sse.client.d.ts +1 -5
- package/package.json +4 -4
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -203,7 +203,7 @@ function addUniversalTemplate({ filename, getContents, emitTs }) {
|
|
|
203
203
|
return modulePath;
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
-
const version = "0.6.
|
|
206
|
+
const version = "0.6.17";
|
|
207
207
|
|
|
208
208
|
async function getDocuments(documentsGlob) {
|
|
209
209
|
try {
|
|
@@ -238,7 +238,7 @@ async function getOperationsTemplate({ loadSchema, loadDocuments, documentGlob }
|
|
|
238
238
|
defaultValue: false
|
|
239
239
|
},
|
|
240
240
|
defaultScalarType: "never",
|
|
241
|
-
|
|
241
|
+
enumsAsConst: true,
|
|
242
242
|
preResolveTypes: false,
|
|
243
243
|
strictScalars: true,
|
|
244
244
|
useTypeImports: true
|
|
@@ -253,7 +253,7 @@ async function getOperationsTemplate({ loadSchema, loadDocuments, documentGlob }
|
|
|
253
253
|
defaultValue: false
|
|
254
254
|
},
|
|
255
255
|
defaultScalarType: "never",
|
|
256
|
-
|
|
256
|
+
enumsAsConst: true,
|
|
257
257
|
exportFragmentSpreadSubTypes: true,
|
|
258
258
|
inlineFragmentTypes: "combine",
|
|
259
259
|
operationResultSuffix: "Result",
|
|
@@ -6,7 +6,7 @@ import type { IsEmptyObject } from "../../shared/lib/types.js";
|
|
|
6
6
|
* @returns Cache manipulation helpers.
|
|
7
7
|
*/
|
|
8
8
|
export declare function useGraphQLCache(): {
|
|
9
|
-
readonly cacheConfig:
|
|
9
|
+
readonly cacheConfig: any;
|
|
10
10
|
readonly read: <TName extends QueryName>(operation: TName, ...args: IsEmptyObject<VariablesOf<TName>> extends true ? [variables?: VariablesOf<TName>] : [variables: VariablesOf<TName>]) => ResultOf<TName> | undefined;
|
|
11
11
|
readonly write: <TName extends QueryName>(operation: TName, variables: VariablesOf<TName>, value: ResultOf<TName> | ((current: ResultOf<TName> | undefined) => ResultOf<TName>)) => void;
|
|
12
12
|
readonly update: <TName extends QueryName>(operation: TName, variables: VariablesOf<TName>, value: ResultOf<TName> | ((current: ResultOf<TName> | undefined) => ResultOf<TName>)) => Promise<void>;
|
|
@@ -10,8 +10,8 @@ type Connection<TItem> = {
|
|
|
10
10
|
};
|
|
11
11
|
export declare function useGraphQLLoadMore<TQueryName extends QueryName, TConnection extends Connection<unknown>>(queryName: TQueryName, inputVars: MaybeRef<Omit<VariablesOf<TQueryName>, "after">>, getConnection: (data?: ResultOf<TQueryName>) => TConnection | null | undefined): Promise<{
|
|
12
12
|
items: Ref<TConnection["nodes"][number][], TConnection["nodes"][number][]>;
|
|
13
|
-
pending:
|
|
14
|
-
error:
|
|
13
|
+
pending: any;
|
|
14
|
+
error: any;
|
|
15
15
|
reset: (clearProducts?: boolean) => void;
|
|
16
16
|
hasNextPage: ComputedRef<boolean>;
|
|
17
17
|
isLoadingMore: Ref<boolean, boolean>;
|
|
@@ -52,6 +52,6 @@ export type MutationOptions<TName extends MutationName, TContext = unknown> = {
|
|
|
52
52
|
* @returns Mutation state and mutate function.
|
|
53
53
|
*/
|
|
54
54
|
export declare function useGraphQLMutation<TName extends MutationName, TContext = unknown>(operationName: TName, options?: MutationOptions<TName, TContext>): {
|
|
55
|
-
pending: import("vue").Ref<boolean, boolean>;
|
|
55
|
+
pending: import("@vue/reactivity").Ref<boolean, boolean>;
|
|
56
56
|
mutate: (...args: IsEmptyObject<VariablesOf<TName>> extends true ? [variables?: VariablesOf<TName>] : [variables: VariablesOf<TName>]) => Promise<ExecuteGraphQLResult<ResultOf<TName>>>;
|
|
57
57
|
};
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import type { ExecuteGraphQLInput, ExecuteGraphQLResult, GraphQLVariables } from "../../shared/lib/types.js";
|
|
2
|
-
declare const _default:
|
|
3
|
-
executeGraphQL: <TResult = unknown, TVariables extends GraphQLVariables = GraphQLVariables>({ query, variables, operationName }: ExecuteGraphQLInput<TVariables>) => Promise<ExecuteGraphQLResult<TResult>>;
|
|
4
|
-
}> & import("#app").ObjectPlugin<{
|
|
5
|
-
executeGraphQL: <TResult = unknown, TVariables extends GraphQLVariables = GraphQLVariables>({ query, variables, operationName }: ExecuteGraphQLInput<TVariables>) => Promise<ExecuteGraphQLResult<TResult>>;
|
|
6
|
-
}>;
|
|
2
|
+
declare const _default: any;
|
|
7
3
|
export default _default;
|
|
8
4
|
type ExecuteGraphQL = <TResult = unknown, TVariables extends GraphQLVariables = GraphQLVariables>(input: ExecuteGraphQLInput<TVariables>) => Promise<ExecuteGraphQLResult<TResult>>;
|
|
9
5
|
declare module "#app/nuxt" {
|
|
@@ -4,11 +4,7 @@ import { type Client as SSEClient } from "graphql-sse";
|
|
|
4
4
|
*
|
|
5
5
|
* @returns Nuxt plugin with SSE client provider.
|
|
6
6
|
*/
|
|
7
|
-
declare const _default:
|
|
8
|
-
getGraphQLSSEClient: () => SSEClient;
|
|
9
|
-
}> & import("#app").ObjectPlugin<{
|
|
10
|
-
getGraphQLSSEClient: () => SSEClient;
|
|
11
|
-
}>;
|
|
7
|
+
declare const _default: any;
|
|
12
8
|
export default _default;
|
|
13
9
|
declare module "#app/nuxt" {
|
|
14
10
|
interface NuxtApp {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lewebsimple/nuxt-graphql",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.17",
|
|
4
4
|
"description": "Opinionated Nuxt module for using GraphQL",
|
|
5
5
|
"repository": "lewebsimple/nuxt-graphql",
|
|
6
6
|
"license": "AGPL-3.0-only",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@graphql-codegen/core": "^5.0.0",
|
|
30
|
-
"@graphql-codegen/typed-document-node": "^6.1.
|
|
31
|
-
"@graphql-codegen/typescript": "^5.0.
|
|
32
|
-
"@graphql-codegen/typescript-operations": "^5.0.
|
|
30
|
+
"@graphql-codegen/typed-document-node": "^6.1.6",
|
|
31
|
+
"@graphql-codegen/typescript": "^5.0.8",
|
|
32
|
+
"@graphql-codegen/typescript-operations": "^5.0.8",
|
|
33
33
|
"@graphql-tools/graphql-file-loader": "^8.1.9",
|
|
34
34
|
"@graphql-tools/load": "^8.1.8",
|
|
35
35
|
"@graphql-tools/schema": "^10.0.31",
|