Skip to content

Commit

Permalink
Feature/467450 - Edge GraphQL query & services updates (#692)
Browse files Browse the repository at this point in the history
Functional changes:
* Update introspection, and connected/disconnected GraphQL components in Next sample to account for latest Edge scheme. The change is that `language` is required in all queries. This fixes the broken build.

Non-functional devEx improvements:
* Add CacheClient and GraphQLClient interfaces to allow implementations to override which 3rd party libs are used by services.
* Pull shared functionality related to using `search` query (ie handling pagination) into new SearchQueryService; update GraphQLDictionaryService and SitemapService to use this service.
* Make it easier to customize our services by changing access level of methods from private to protected

Misc changes:
* [sitecore-jss] Move app root query functionality from /utils to /graphql
* Fix typo in docs
  • Loading branch information
anastasiya29 authored May 17, 2021
1 parent c3ca2ff commit 05ae816
Show file tree
Hide file tree
Showing 31 changed files with 1,186 additions and 997 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ To create a JSS application, you must:
npm install -g @sitecore-jss/sitecore-jss-cli
```

> To verify the successful installation of the JSS CLI and to see the list of commands availably globally, run `jss --help`.
> To verify the successful installation of the JSS CLI and to see the list of commands availability globally, run `jss --help`.
3. Run:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class ComponentPropsService {
* @param {NextContext} context next context
* @returns {Promise<ComponentPropsCollection>} component props
*/
private async fetchComponentProps<NextContext>(
protected async fetchComponentProps<NextContext>(
fetchFunctionFactory: FetchFunctionFactory<NextContext>,
layoutData: LayoutServiceData,
context: NextContext
Expand All @@ -112,7 +112,7 @@ export class ComponentPropsService {
* @param {ComponentPropsRequest<NextContext>[]} params.requests
* @returns {ComponentPropsRequest<NextContext>[]} array of requests
*/
private collectRequests<NextContext>(params: {
protected collectRequests<NextContext>(params: {
placeholders?: PlaceholdersData;
fetchFunctionFactory: FetchFunctionFactory<NextContext>;
layoutData: LayoutServiceData;
Expand Down Expand Up @@ -158,7 +158,7 @@ export class ComponentPropsService {
* @param {ComponentPropsRequest<NextContext>[]} requests requests
* @returns {Promise<ComponentPropsCollection>} requests result
*/
private async execRequests<NextContext>(
protected async execRequests<NextContext>(
requests: ComponentPropsRequest<NextContext>[]
): Promise<ComponentPropsCollection> {
const componentProps: ComponentPropsCollection = {};
Expand Down Expand Up @@ -211,7 +211,7 @@ export class ComponentPropsService {
* @param {PlaceholdersData} placeholders placeholders
* @returns {ComponentRendering[]} renderings
*/
private flatRenderings(placeholders: PlaceholdersData): ComponentRendering[] {
protected flatRenderings(placeholders: PlaceholdersData): ComponentRendering[] {
const allComponentRenderings: ComponentRendering[] = [];
const placeholdersArr = Object.values(placeholders);

Expand Down
Loading

0 comments on commit 05ae816

Please sign in to comment.