Skip to content

Commit

Permalink
Merge pull request #31 from ramangupta44/feature/update-apollo-client…
Browse files Browse the repository at this point in the history
…-to-delivery-endpoint

Updated Apollo client graphql endpoint
  • Loading branch information
ramangupta44 authored Aug 17, 2023
2 parents 4d8dd60 + dcd38fe commit 276b042
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/sxastarter/src/components/Espire/Listing/Listing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const Listing = (props: ListingProps): JSX.Element => {
const { sitecoreContext } = useSitecoreContext();
const scope = props?.params?.Scope;
const language = sitecoreContext?.language;
const count = props?.params?.['Display Count'];
const count = props?.params?.['Display Count'] ? props?.params?.['Display Count'] : 5;

const GetList = async (): Promise<unknown> => {
const { data } = await apolloClient.query({
Expand Down
10 changes: 5 additions & 5 deletions src/sxastarter/src/lib/graphql/graphql-apollo-client.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { ApolloClient, InMemoryCache } from '@apollo/client';
import config from 'temp/config';

export const apolloClient = new ApolloClient({
uri: `${config.sitecoreApiHost}/sitecore/api/graph/edge`,
uri: `https://edge.sitecorecloud.io/api/graphql/v1`,
cache: new InMemoryCache({}),
headers: {
'Content-Type': 'application/json',
Authorization: config.sitecoreApiKey,
sc_apikey: config.sitecoreApiKey,
Authorization:
'dXBvekgxNmJPL1JsWGg2S2RkV1Z2bnA0MnZNcHR6QTlIZ09oa0g4cDlhUT18ZXNwaXJlaW5mb2wzOTkzLWVzcGlyZXN0YXJ0ZWYwNi1kZXYtNjJhYQ==',
sc_apikey:
'dXBvekgxNmJPL1JsWGg2S2RkV1Z2bnA0MnZNcHR6QTlIZ09oa0g4cDlhUT18ZXNwaXJlaW5mb2wzOTkzLWVzcGlyZXN0YXJ0ZWYwNi1kZXYtNjJhYQ==',
},
});
1 change: 0 additions & 1 deletion src/sxastarter/src/lib/middleware/smallcase-url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { NextResponse } from 'next/server';

export function smallcaseurl(req: NextRequest): NextResponse {
const { pathname, origin } = req.nextUrl;
console.log(req, 'Rehmo');
if (pathname === pathname.toLowerCase()) {
return NextResponse.next();
}
Expand Down

0 comments on commit 276b042

Please sign in to comment.