nuxt-graphql-middleware 4.0.0 → 4.1.1

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.
Files changed (70) hide show
  1. package/README.md +10 -2
  2. package/dist/client/200.html +10 -12
  3. package/dist/client/404.html +10 -12
  4. package/dist/client/_nuxt/Bk31qVW4.js +1 -0
  5. package/dist/client/_nuxt/CHM3Rz8p.js +1 -0
  6. package/dist/client/_nuxt/CUKk0hSk.js +24 -0
  7. package/dist/client/_nuxt/Ca6k-hEN.js +2 -0
  8. package/dist/client/_nuxt/KmIjpfWJ.js +1 -0
  9. package/dist/client/_nuxt/builds/latest.json +1 -1
  10. package/dist/client/_nuxt/builds/meta/42e92f16-7f29-4b6f-8e46-68076031ade3.json +1 -0
  11. package/dist/client/_nuxt/entry.BMcZ91J5.css +1 -0
  12. package/dist/client/_nuxt/error-404.CjTTbIxB.css +1 -0
  13. package/dist/client/_nuxt/error-500.B4KzowuE.css +1 -0
  14. package/dist/client/_nuxt/index.DCCKx2Zk.css +1 -0
  15. package/dist/client/index.html +10 -12
  16. package/dist/module.d.mts +71 -10
  17. package/dist/module.d.ts +71 -10
  18. package/dist/module.json +6 -2
  19. package/dist/module.mjs +283 -179
  20. package/dist/runtime/composables/nuxtApp.d.ts +9 -4
  21. package/dist/runtime/composables/nuxtApp.js +47 -0
  22. package/dist/runtime/composables/server.d.ts +4 -3
  23. package/dist/runtime/composables/{server.mjs → server.js} +2 -2
  24. package/dist/runtime/composables/shared.d.ts +12 -7
  25. package/dist/runtime/composables/useAsyncGraphqlQuery.d.ts +22 -0
  26. package/dist/runtime/composables/useAsyncGraphqlQuery.js +43 -0
  27. package/dist/runtime/composables/useGraphqlMutation.d.ts +3 -2
  28. package/dist/runtime/composables/{useGraphqlMutation.mjs → useGraphqlMutation.js} +2 -2
  29. package/dist/runtime/composables/useGraphqlQuery.d.ts +3 -2
  30. package/dist/runtime/composables/useGraphqlQuery.js +20 -0
  31. package/dist/runtime/composables/useGraphqlState.d.ts +1 -1
  32. package/dist/runtime/composables/{useGraphqlState.mjs → useGraphqlState.js} +1 -1
  33. package/dist/runtime/composables/useGraphqlUploadMutation.d.ts +7 -0
  34. package/dist/runtime/composables/useGraphqlUploadMutation.js +57 -0
  35. package/dist/runtime/helpers/ClientCache.d.ts +15 -0
  36. package/dist/runtime/helpers/ClientCache.js +40 -0
  37. package/dist/runtime/helpers/{index.mjs → index.js} +1 -1
  38. package/dist/runtime/plugins/provideState.d.ts +1 -1
  39. package/dist/runtime/plugins/provideState.js +17 -0
  40. package/dist/runtime/serverHandler/helpers/index.d.ts +5 -3
  41. package/dist/runtime/serverHandler/helpers/{index.mjs → index.js} +2 -2
  42. package/dist/runtime/serverHandler/{index.mjs → index.js} +3 -3
  43. package/dist/runtime/serverHandler/upload.d.ts +2 -0
  44. package/dist/runtime/serverHandler/upload.js +101 -0
  45. package/dist/runtime/serverOptions/defineGraphqlServerOptions.d.ts +2 -2
  46. package/dist/runtime/serverOptions/index.d.ts +1 -1
  47. package/dist/runtime/serverOptions/{index.mjs → index.js} +1 -1
  48. package/dist/runtime/types.d.ts +24 -0
  49. package/dist/runtime/types.js +0 -0
  50. package/dist/types.d.mts +2 -9
  51. package/dist/types.d.ts +2 -9
  52. package/package.json +43 -32
  53. package/dist/client/_nuxt/_plugin-vue_export-helper.x3n3nnut.js +0 -1
  54. package/dist/client/_nuxt/builds/meta/71f1ba68-6be9-464d-87d1-1b4b3ac786b2.json +0 -1
  55. package/dist/client/_nuxt/entry.N5CnhLMX.css +0 -1
  56. package/dist/client/_nuxt/entry.sn4ItzJP.js +0 -29
  57. package/dist/client/_nuxt/error-404._g063Njv.js +0 -1
  58. package/dist/client/_nuxt/error-404.gOl2ep2B.css +0 -1
  59. package/dist/client/_nuxt/error-500.iP22ayZD.js +0 -1
  60. package/dist/client/_nuxt/error-500.z8GAN5B3.css +0 -1
  61. package/dist/client/_nuxt/index.KH5Eug0w.css +0 -1
  62. package/dist/client/_nuxt/index.wowlKkKL.js +0 -2
  63. package/dist/client/_nuxt/vue.f36acd1f.H09MX4qF.js +0 -1
  64. package/dist/runtime/composables/nuxtApp.mjs +0 -15
  65. package/dist/runtime/composables/useGraphqlQuery.mjs +0 -9
  66. package/dist/runtime/plugins/provideState.mjs +0 -7
  67. /package/dist/runtime/composables/{shared.mjs → shared.js} +0 -0
  68. /package/dist/runtime/serverHandler/{debug.mjs → debug.js} +0 -0
  69. /package/dist/runtime/serverOptions/{defineGraphqlServerOptions.mjs → defineGraphqlServerOptions.js} +0 -0
  70. /package/dist/runtime/settings/{index.mjs → index.js} +0 -0
@@ -1 +0,0 @@
1
- import{E as o,r as u,F as f,G as d,e as v,H as l,I as i,J as h,K as m}from"./entry.sn4ItzJP.js";function U(t,a={}){const e=a.head||o();if(e)return e.ssr?e.push(t,a):p(e,t,a)}function p(t,a,e={}){const s=u(!1),n=u({});f(()=>{n.value=s.value?{}:h(a)});const r=t.push(n.value,e);return d(n,c=>{r.patch(c)}),m()&&(v(()=>{r.dispose()}),l(()=>{s.value=!0}),i(()=>{s.value=!1})),r}export{U as u};
@@ -1,15 +0,0 @@
1
- import { useGraphqlState } from "./useGraphqlState.mjs";
2
- import { getEndpoint } from "./shared.mjs";
3
- export function performRequest(operation, operationName, method, options) {
4
- const state = useGraphqlState();
5
- return $fetch(getEndpoint(operation, operationName), {
6
- ...state && state.fetchOptions ? state.fetchOptions : {},
7
- ...options,
8
- method
9
- }).then((v) => {
10
- return {
11
- data: v.data,
12
- errors: v.errors || []
13
- };
14
- });
15
- }
@@ -1,9 +0,0 @@
1
- import { buildRequestParams } from "./../helpers/index.mjs";
2
- import { performRequest } from "./nuxtApp.mjs";
3
- export function useGraphqlQuery(...args) {
4
- const [name, variables, fetchOptions = {}] = typeof args[0] === "string" ? [args[0], args[1]] : [args[0].name, args[0].variables, args[0].fetchOptions];
5
- return performRequest("query", name, "get", {
6
- params: buildRequestParams(variables),
7
- ...fetchOptions
8
- });
9
- }
@@ -1,7 +0,0 @@
1
- import { defineNuxtPlugin } from "nuxt/app";
2
- export default defineNuxtPlugin((app) => {
3
- const state = {
4
- fetchOptions: {}
5
- };
6
- app.provide("graphqlState", state);
7
- });
File without changes