Skip to content

Commit

Permalink
Revert "[sitecore-jss-nextjs][templates/nextjs] Move graphql client i…
Browse files Browse the repository at this point in the history
…mports - followup (#1650)"

This reverts commit 626675c.
  • Loading branch information
ambrauer authored Nov 1, 2023
1 parent 626675c commit 22fc221
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {
GraphQLRequestClientFactoryConfig,
GraphQLRequestClient,
getEdgeProxyContentUrl
} from '@sitecore-jss/sitecore-jss-nextjs/graphql';
} from '@sitecore-jss/sitecore-jss-nextjs/graphql-client';
import { getEdgeProxyContentUrl } from '@sitecore-jss/sitecore-jss-nextjs/utils';
import { JssConfig } from 'lib/config';

/**
Expand Down
1 change: 1 addition & 0 deletions packages/sitecore-jss-nextjs/graphql-client.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './types/graphql-client/index';
1 change: 1 addition & 0 deletions packages/sitecore-jss-nextjs/graphql-client.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('./dist/cjs/graphql-client/index');
1 change: 0 additions & 1 deletion packages/sitecore-jss-nextjs/graphql.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/sitecore-jss-nextjs/graphql.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ export {
GraphQLRequestClient,
GraphQLRequestClientFactory,
GraphQLRequestClientFactoryConfig,
getEdgeProxyContentUrl,
} from '@sitecore-jss/sitecore-jss/graphql';
} from '@sitecore-jss/sitecore-jss';
4 changes: 2 additions & 2 deletions packages/sitecore-jss-nextjs/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export {

// we will remove the root exports for these later
// we cannot mark exports as deprected directly, so we're using this hack instead
import { GraphQLRequestClient as GraphQLRequestClientDep } from './graphql';
import { GraphQLRequestClient as GraphQLRequestClientDep } from './graphql-client';
import {
isEditorActive as isEditorActiveDep,
resetEditorChromes as resetEditorChromesDep,
Expand Down Expand Up @@ -43,7 +43,7 @@ const {
handleEditorFastRefreshDep,
getPublicUrlDep,
};
/** @deprecated use import from '@sitecore-jss/sitecore-jss-nextjs/graphql' instead */
/** @deprecated use import from '@sitecore-jss/sitecore-jss-nextjs/graphql-client' instead */
const { GraphQLRequestClientDep: GraphQLRequestClient } = {
GraphQLRequestClientDep,
};
Expand Down
1 change: 1 addition & 0 deletions packages/sitecore-jss-nextjs/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ export {
resetEditorChromes,
resolveUrl,
} from '@sitecore-jss/sitecore-jss/utils';
export { getEdgeProxyContentUrl } from '@sitecore-jss/sitecore-jss/graphql';
2 changes: 1 addition & 1 deletion packages/sitecore-jss-nextjs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"editing.d.ts",
"monitoring.d.ts",
"site.d.ts",
"graphql.d.ts",
"graphql-client.d.ts",
"utils.d.ts",
"src/tests/*",
"src/test-data/*",
Expand Down

0 comments on commit 22fc221

Please sign in to comment.