Skip to content

Commit fda0441

Browse files
authored
Update README.md
1 parent 30f2199 commit fda0441

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
# GraphQL schema components.
44

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.
66

77
Read more about the idea [here](https://medium.com/expedia-group-tech/graphql-component-architecture-principles-homeaway-ede8a58d6fde).
88

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.
1010

1111
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.
1212

@@ -31,7 +31,7 @@ federation (2 subschema services implemented via `GraphQLComponent` and a vanill
3131

3232
### Running examples:
3333
* composition: `npm run start-composition`
34-
* fedration: `npm run start-federation`
34+
* federation: `npm run start-federation`
3535
* go to `localhost:4000/graphql`
3636
* for composition this will bring up the GraphQL Playground for a plain old Apollo Server
3737
* 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
6464
- `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.
6565
- `transforms` (optional `Array<Transform>`): Transform being a valid `graphql-tools` transform
6666

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.
6868

6969
A GraphQLComponent instance (ie, `new GraphQLComponent({...})`) has the following API:
7070

@@ -159,7 +159,7 @@ Data sources in `graphql-component` do not extend `apollo-datasource`'s `DataSou
159159
Instead, data sources in components will be injected into the context, but wrapped in a proxy such that the global
160160
context will be injected as the first argument of any function implemented in a data source class.
161161

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),
163163
while still ensuring that a data source will have the current context.
164164

165165
For example, a data source should be implemented like:

0 commit comments

Comments
 (0)