Skip to content

Commit

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

* [sitecore-jss-nextjs] reorganize exports into graphql module

* lint

---------

Co-authored-by: art-alexeyenko <undefined>
  • Loading branch information
art-alexeyenko authored Nov 1, 2023
1 parent b4a4779 commit 626675c
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,
} from '@sitecore-jss/sitecore-jss-nextjs/graphql-client';
import { getEdgeProxyContentUrl } from '@sitecore-jss/sitecore-jss-nextjs/utils';
getEdgeProxyContentUrl
} from '@sitecore-jss/sitecore-jss-nextjs/graphql';
import { JssConfig } from 'lib/config';

/**
Expand Down
1 change: 0 additions & 1 deletion packages/sitecore-jss-nextjs/graphql-client.d.ts

This file was deleted.

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

This file was deleted.

1 change: 1 addition & 0 deletions packages/sitecore-jss-nextjs/graphql.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './types/graphql/index';
1 change: 1 addition & 0 deletions packages/sitecore-jss-nextjs/graphql.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('./dist/cjs/graphql/index');
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ export {
GraphQLRequestClient,
GraphQLRequestClientFactory,
GraphQLRequestClientFactoryConfig,
} from '@sitecore-jss/sitecore-jss';
getEdgeProxyContentUrl,
} from '@sitecore-jss/sitecore-jss/graphql';
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-client';
import { GraphQLRequestClient as GraphQLRequestClientDep } from './graphql';
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-client' instead */
/** @deprecated use import from '@sitecore-jss/sitecore-jss-nextjs/graphql' instead */
const { GraphQLRequestClientDep: GraphQLRequestClient } = {
GraphQLRequestClientDep,
};
Expand Down
1 change: 0 additions & 1 deletion packages/sitecore-jss-nextjs/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ 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-client.d.ts",
"graphql.d.ts",
"utils.d.ts",
"src/tests/*",
"src/test-data/*",
Expand Down

0 comments on commit 626675c

Please sign in to comment.