Skip to content

Commit

Permalink
[templates/nextjs] [templates/nextjs-styleguide] Update deprecated Gr…
Browse files Browse the repository at this point in the history
…aphQLRequestClient import statement (#1728)

* update deprecated GraphQLRequestClient imports

* update changelog
  • Loading branch information
yavorsk authored Feb 6, 2024
1 parent 601430f commit d11a8ce
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Our versioning strategy is as follows:
* `[sitecore-jss]` `[templates/nextjs-xmcloud]` Load the content styles for the RichText component ([#1670](https://github.com/Sitecore/jss/pull/1670))([#1683](https://github.com/Sitecore/jss/pull/1683)) ([#1684](https://github.com/Sitecore/jss/pull/1684)) ([#1693](https://github.com/Sitecore/jss/pull/1693))
* `[templates/react]` `[sitecore-jss-react]` Replace package 'deep-equal' with 'fast-deep-equal'. No functionality change only performance improvement ([#1719](https://github.com/Sitecore/jss/pull/1719)) ([#1665](https://github.com/Sitecore/jss/pull/1665))
* `[templates/nextjs-xmcloud]` `[sitecore-jss]` `[sitecore-jss-nextjs]` `[sitecore-jss-react]` Add support for loading appropriate stylesheets whenever a theme is applied to BYOC and SXA components by introducing new function getComponentLibraryStylesheetLinks, which replaces getFEAASLibraryStylesheetLinks (which has been marked as deprecated) ([#1722](https://github.com/Sitecore/jss/pull/1722))
* `[templates/nextjs]` `[templates/nextjs-styleguide]` Modify all GraphQLRequestClient import statements so that it gets imported from the /graphql submodule ([#1728](https://github.com/Sitecore/jss/pull/1728))

### 🐛 Bug Fixes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import {
GetServerSideComponentProps,
GetStaticComponentProps,
constants,
GraphQLRequestClient,
withDatasourceCheck,
} from '@sitecore-jss/sitecore-jss-nextjs';
import { GraphQLRequestClient } from '@sitecore-jss/sitecore-jss-nextjs/graphql';
import {
resetEditorChromes
} from '@sitecore-jss/sitecore-jss-nextjs/utils';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GraphQLRequestClient } from '@sitecore-jss/sitecore-jss-nextjs';
import { GraphQLRequestClient } from '@sitecore-jss/sitecore-jss-nextjs/graphql';
import fs from 'fs';
import { getIntrospectionQuery } from 'graphql';

Expand Down Expand Up @@ -26,11 +26,11 @@ const client = new GraphQLRequestClient(jssConfig.graphQLEndpoint, {

client
.request(getIntrospectionQuery())
.then((result) => {
.then(result => {
fs.writeFile(
'./src/temp/GraphQLIntrospectionResult.json',
JSON.stringify(result, null, 2),
(err) => {
err => {
if (err) {
console.error('Error writing GraphQLIntrospectionResult file', err);
return;
Expand All @@ -40,7 +40,7 @@ client
}
);
})
.catch((e) => {
.catch(e => {
console.error(e);
process.exit(1);
});

0 comments on commit d11a8ce

Please sign in to comment.