GraphQL support in the JSS Angular app
The sample application supports using Sitecore GraphQL to enable accessing content or other custom data schemas (for example, aggregating an existing set of back-end REST services).
Sitecore GraphQL does not come with a disconnected mock service, so it can only operate with a JSS app running in connected, integrated, or headless application modes. If you require disconnected GraphQL functionality, graphql-tools has very powerful GraphQL mocking capabilities.
The remainder of this topic describes using GraphQL in connected mode.
Do not confuse connected application mode with connected GraphQL.
The Angular sample app uses the apollo-angular client as a bridge between Angular and Apollo GraphQL. This client is leveraged inside the JssGraphQLService
service. This service has the same API as Apollo but performs some JSS-specific operations to make it compatible with Sitecore.
Complete examples of using connected and integrated GraphQL are provided with the sample app and contain documentation comments. For example, src/app/components/graph-ql-connected-demo
shows you how to use connected GraphQL. Please refer to these samples for implementation details.