naystack 1.2.21 → 1.2.22

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.
@@ -41,12 +41,10 @@ var import_client = require("@apollo/client");
41
41
  var import_client_integration_nextjs = require("@apollo/client-integration-nextjs");
42
42
  var import_client2 = require("naystack/auth/email/client");
43
43
  var import_react = __toESM(require("react"));
44
- var getApolloWrapper = (endpoint, {
45
- cacheConfig
46
- }) => {
44
+ var getApolloWrapper = (endpoint, options) => {
47
45
  function makeClient() {
48
46
  return new import_client_integration_nextjs.ApolloClient({
49
- cache: new import_client_integration_nextjs.InMemoryCache(cacheConfig),
47
+ cache: new import_client_integration_nextjs.InMemoryCache(options?.cacheConfig),
50
48
  link: new import_client.HttpLink({
51
49
  uri: endpoint
52
50
  })
@@ -3,7 +3,7 @@ import { InMemoryCacheConfig, OperationVariables, MutationHookOptions } from '@a
3
3
  import { TypedDocumentNode } from '@graphql-typed-document-node/core';
4
4
  import react__default, { PropsWithChildren } from 'react';
5
5
 
6
- declare const getApolloWrapper: (endpoint: string, { cacheConfig, }: {
6
+ declare const getApolloWrapper: (endpoint: string, options?: {
7
7
  cacheConfig?: InMemoryCacheConfig;
8
8
  }) => ({ children }: PropsWithChildren) => react__default.JSX.Element;
9
9
  declare const tokenContext: (token?: string | null) => {
@@ -3,7 +3,7 @@ import { InMemoryCacheConfig, OperationVariables, MutationHookOptions } from '@a
3
3
  import { TypedDocumentNode } from '@graphql-typed-document-node/core';
4
4
  import react__default, { PropsWithChildren } from 'react';
5
5
 
6
- declare const getApolloWrapper: (endpoint: string, { cacheConfig, }: {
6
+ declare const getApolloWrapper: (endpoint: string, options?: {
7
7
  cacheConfig?: InMemoryCacheConfig;
8
8
  }) => ({ children }: PropsWithChildren) => react__default.JSX.Element;
9
9
  declare const tokenContext: (token?: string | null) => {
@@ -17,12 +17,10 @@ import React, {
17
17
  useEffect,
18
18
  useState
19
19
  } from "react";
20
- var getApolloWrapper = (endpoint, {
21
- cacheConfig
22
- }) => {
20
+ var getApolloWrapper = (endpoint, options) => {
23
21
  function makeClient() {
24
22
  return new ApolloClient({
25
- cache: new InMemoryCache(cacheConfig),
23
+ cache: new InMemoryCache(options?.cacheConfig),
26
24
  link: new HttpLink({
27
25
  uri: endpoint
28
26
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "naystack",
3
- "version": "1.2.21",
3
+ "version": "1.2.22",
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",