naystack 1.7.3 → 1.7.4

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.
@@ -538,7 +538,6 @@ var require_error = __commonJS({
538
538
  // src/graphql/index.ts
539
539
  var graphql_exports = {};
540
540
  __export(graphql_exports, {
541
- ApolloWrapper: () => ApolloWrapper,
542
541
  FieldLibrary: () => FieldLibrary,
543
542
  GQLError: () => GQLError,
544
543
  Injector: () => Injector,
@@ -975,28 +974,8 @@ var query = async (_query, options) => {
975
974
  });
976
975
  return res.data;
977
976
  };
978
-
979
- // src/graphql/next.tsx
980
- var import_client2 = require("@apollo/client");
981
- var import_client_integration_nextjs2 = require("@apollo/client-integration-nextjs");
982
- var import_react4 = __toESM(require("react"));
983
- function makeClient(cacheConfig) {
984
- return new import_client_integration_nextjs2.ApolloClient({
985
- cache: new import_client_integration_nextjs2.InMemoryCache(cacheConfig),
986
- link: new import_client2.HttpLink({
987
- uri: getEnv("NEXT_PUBLIC_GRAPHQL_ENDPOINT" /* NEXT_PUBLIC_GRAPHQL_ENDPOINT */)
988
- })
989
- });
990
- }
991
- var ApolloWrapper = ({
992
- children,
993
- cacheConfig
994
- }) => {
995
- return /* @__PURE__ */ import_react4.default.createElement(import_client_integration_nextjs2.ApolloNextAppProvider, { makeClient: () => makeClient(cacheConfig) }, children);
996
- };
997
977
  // Annotate the CommonJS export names for ESM import in node:
998
978
  0 && (module.exports = {
999
- ApolloWrapper,
1000
979
  FieldLibrary,
1001
980
  GQLError,
1002
981
  Injector,
@@ -3,7 +3,6 @@ export { setupGraphQL } from './init.mjs';
3
3
  export { AuthorizedContext, Context } from './types.mjs';
4
4
  export { FieldLibrary, FieldResolverDefinition, FieldResponseType, QueryDefinition, QueryLibrary, QueryResponseType, field, resolver } from './utils.mjs';
5
5
  export { Injector, query } from './server.mjs';
6
- export { ApolloWrapper } from './next.mjs';
7
6
  import 'graphql/error';
8
7
  import '@apollo/server';
9
8
  import 'next/server';
@@ -3,7 +3,6 @@ export { setupGraphQL } from './init.js';
3
3
  export { AuthorizedContext, Context } from './types.js';
4
4
  export { FieldLibrary, FieldResolverDefinition, FieldResponseType, QueryDefinition, QueryLibrary, QueryResponseType, field, resolver } from './utils.js';
5
5
  export { Injector, query } from './server.js';
6
- export { ApolloWrapper } from './next.js';
7
6
  import 'graphql/error';
8
7
  import '@apollo/server';
9
8
  import 'next/server';
@@ -972,31 +972,7 @@ var query = async (_query, options) => {
972
972
  });
973
973
  return res.data;
974
974
  };
975
-
976
- // src/graphql/next.tsx
977
- import { HttpLink as HttpLink2 } from "@apollo/client";
978
- import {
979
- ApolloClient as ApolloClient2,
980
- ApolloNextAppProvider,
981
- InMemoryCache as InMemoryCache2
982
- } from "@apollo/client-integration-nextjs";
983
- import React2 from "react";
984
- function makeClient(cacheConfig) {
985
- return new ApolloClient2({
986
- cache: new InMemoryCache2(cacheConfig),
987
- link: new HttpLink2({
988
- uri: getEnv("NEXT_PUBLIC_GRAPHQL_ENDPOINT" /* NEXT_PUBLIC_GRAPHQL_ENDPOINT */)
989
- })
990
- });
991
- }
992
- var ApolloWrapper = ({
993
- children,
994
- cacheConfig
995
- }) => {
996
- return /* @__PURE__ */ React2.createElement(ApolloNextAppProvider, { makeClient: () => makeClient(cacheConfig) }, children);
997
- };
998
975
  export {
999
- ApolloWrapper,
1000
976
  FieldLibrary,
1001
977
  GQLError,
1002
978
  Injector,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "naystack",
3
- "version": "1.7.3",
3
+ "version": "1.7.4",
4
4
  "description": "A stack built with Next + GraphQL + S3 + Auth",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -33,6 +33,11 @@
33
33
  "import": "./dist/graphql/client.esm.js",
34
34
  "require": "./dist/graphql/client.cjs.js"
35
35
  },
36
+ "./graphql/next": {
37
+ "types": "./dist/graphql/next.d.ts",
38
+ "import": "./dist/graphql/next.esm.js",
39
+ "require": "./dist/graphql/next.cjs.js"
40
+ },
36
41
  "./file": {
37
42
  "types": "./dist/file/index.d.ts",
38
43
  "import": "./dist/file/index.esm.js",