You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,11 @@
2
2
3
3
# GraphQL schema components.
4
4
5
-
This project is designed to faciliate componentized or modularized development of GraphQL schemas.
5
+
This project is designed to facilitate componentized or modularized development of GraphQL schemas.
6
6
7
7
Read more about the idea [here](https://medium.com/expedia-group-tech/graphql-component-architecture-principles-homeaway-ede8a58d6fde).
8
8
9
-
`graphql-component` lets you build a schema progressively through a tree (faciliated through `imports`) of GraphQLComponent instances. Each GraphQLComponent instance encapsulates an executable GraphQL schema, specifically a `graphql-js` GraphQLSchema object. See the API below, but the encapsulated schema is accessible through a simple `schema` getter on a given `GraphQLComponent` instance.
9
+
`graphql-component` lets you build a schema progressively through a tree (facilitated through `imports`) of GraphQLComponent instances. Each GraphQLComponent instance encapsulates an executable GraphQL schema, specifically a `graphql-js` GraphQLSchema object. See the API below, but the encapsulated schema is accessible through a simple `schema` getter on a given `GraphQLComponent` instance.
10
10
11
11
Generally speaking, each instance of `GraphQLComponent` has reference to an instance of [`GraphQLSchema`](https://graphql.org/graphql-js/type/#graphqlschema). This instance of `GraphQLSchema` is built in a several ways, depending on the options passed to a given `GraphQLComponent`'s constructor.
12
12
@@ -31,7 +31,7 @@ federation (2 subschema services implemented via `GraphQLComponent` and a vanill
31
31
32
32
### Running examples:
33
33
* composition: `npm run start-composition`
34
-
*fedration: `npm run start-federation`
34
+
*federation: `npm run start-federation`
35
35
* go to `localhost:4000/graphql`
36
36
* for composition this will bring up the GraphQL Playground for a plain old Apollo Server
37
37
* for the federation example this will bring up the GraphQL Playground for an Apollo Federated Gateway
@@ -64,7 +64,7 @@ federation (2 subschema services implemented via `GraphQLComponent` and a vanill
64
64
-`args` (`object`, optional) - an object literal whose keys/values are passed as args to the delegatee's target field resolver. By default, the resolver's args from which `delegateToComponent` is called will be passed if the target field has an argument of the same name. Otherwise, arguments passed via the `args` object will override the calling resolver's args of the same name.
65
65
-`transforms` (optional `Array<Transform>`): Transform being a valid `graphql-tools` transform
66
66
67
-
- please see `graphql-tools`[delegateToSchema](https://www.graphql-tools.com/docs/schema-delegation/#delegatetoschema) documentation for more details on available `options` since the delegateToComponent fuctions is simply an adapter for the `GraphQLComponent` API.
67
+
- please see `graphql-tools`[delegateToSchema](https://www.graphql-tools.com/docs/schema-delegation/#delegatetoschema) documentation for more details on available `options` since the delegateToComponent functions is simply an adapter for the `GraphQLComponent` API.
68
68
69
69
A GraphQLComponent instance (ie, `new GraphQLComponent({...})`) has the following API:
70
70
@@ -159,7 +159,7 @@ Data sources in `graphql-component` do not extend `apollo-datasource`'s `DataSou
159
159
Instead, data sources in components will be injected into the context, but wrapped in a proxy such that the global
160
160
context will be injected as the first argument of any function implemented in a data source class.
161
161
162
-
This allows there to exist one instance of a data source for caching or other statefullness (like circuit breakers),
162
+
This allows there to exist one instance of a data source for caching or other statefulness (like circuit breakers),
163
163
while still ensuring that a data source will have the current context.
164
164
165
165
For example, a data source should be implemented like:
0 commit comments