diff --git a/packages/create-sitecore-jss/src/templates/nextjs/src/lib/graphql-client-factory/create.ts b/packages/create-sitecore-jss/src/templates/nextjs/src/lib/graphql-client-factory/create.ts index eef1bc95a9..bc76efc74f 100644 --- a/packages/create-sitecore-jss/src/templates/nextjs/src/lib/graphql-client-factory/create.ts +++ b/packages/create-sitecore-jss/src/templates/nextjs/src/lib/graphql-client-factory/create.ts @@ -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'; /** diff --git a/packages/sitecore-jss-nextjs/graphql-client.d.ts b/packages/sitecore-jss-nextjs/graphql-client.d.ts deleted file mode 100644 index e3826d475b..0000000000 --- a/packages/sitecore-jss-nextjs/graphql-client.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './types/graphql-client/index'; diff --git a/packages/sitecore-jss-nextjs/graphql-client.js b/packages/sitecore-jss-nextjs/graphql-client.js deleted file mode 100644 index 522605aeb0..0000000000 --- a/packages/sitecore-jss-nextjs/graphql-client.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./dist/cjs/graphql-client/index'); diff --git a/packages/sitecore-jss-nextjs/graphql.d.ts b/packages/sitecore-jss-nextjs/graphql.d.ts new file mode 100644 index 0000000000..4231e39489 --- /dev/null +++ b/packages/sitecore-jss-nextjs/graphql.d.ts @@ -0,0 +1 @@ +export * from './types/graphql/index'; diff --git a/packages/sitecore-jss-nextjs/graphql.js b/packages/sitecore-jss-nextjs/graphql.js new file mode 100644 index 0000000000..9c7830ac8f --- /dev/null +++ b/packages/sitecore-jss-nextjs/graphql.js @@ -0,0 +1 @@ +module.exports = require('./dist/cjs/graphql/index'); diff --git a/packages/sitecore-jss-nextjs/src/graphql-client/index.ts b/packages/sitecore-jss-nextjs/src/graphql/index.ts similarity index 58% rename from packages/sitecore-jss-nextjs/src/graphql-client/index.ts rename to packages/sitecore-jss-nextjs/src/graphql/index.ts index f7346f3b2a..157e4bed60 100644 --- a/packages/sitecore-jss-nextjs/src/graphql-client/index.ts +++ b/packages/sitecore-jss-nextjs/src/graphql/index.ts @@ -2,4 +2,5 @@ export { GraphQLRequestClient, GraphQLRequestClientFactory, GraphQLRequestClientFactoryConfig, -} from '@sitecore-jss/sitecore-jss'; + getEdgeProxyContentUrl, +} from '@sitecore-jss/sitecore-jss/graphql'; diff --git a/packages/sitecore-jss-nextjs/src/index.ts b/packages/sitecore-jss-nextjs/src/index.ts index 260e9cfe9e..e8f332c66e 100644 --- a/packages/sitecore-jss-nextjs/src/index.ts +++ b/packages/sitecore-jss-nextjs/src/index.ts @@ -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, @@ -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, }; diff --git a/packages/sitecore-jss-nextjs/src/utils/index.ts b/packages/sitecore-jss-nextjs/src/utils/index.ts index 6151c9ef60..bb06217af3 100644 --- a/packages/sitecore-jss-nextjs/src/utils/index.ts +++ b/packages/sitecore-jss-nextjs/src/utils/index.ts @@ -5,4 +5,3 @@ export { resetEditorChromes, resolveUrl, } from '@sitecore-jss/sitecore-jss/utils'; -export { getEdgeProxyContentUrl } from '@sitecore-jss/sitecore-jss/graphql'; diff --git a/packages/sitecore-jss-nextjs/tsconfig.json b/packages/sitecore-jss-nextjs/tsconfig.json index 681a1f4488..348881666f 100644 --- a/packages/sitecore-jss-nextjs/tsconfig.json +++ b/packages/sitecore-jss-nextjs/tsconfig.json @@ -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/*",