Skip to content

Commit d348b58

Browse files
Stefan Nowakmartijnwalraven
authored andcommitted
Update documentation
1 parent 6920e34 commit d348b58

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

packages/apollo/README.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -422,40 +422,49 @@ module.exports = {
422422

423423
### Service Configuration
424424

425-
When linking a client to a service, you can either use the name of a service that has been published to the Apollo service registry, or you can use a remote url that supports introspection
425+
When linking a client to a service, you can either use the name of a service that has been published to the Apollo service registry, or you can use a remote url that supports introspection or you can provide a filepath of a generated SDL (Schema Definition Language) file, for example: `schema.json` or `schema.graphql`.
426426

427427
```js
428428
module.exports = {
429429
client: {
430430
service: "my-service-name",
431+
431432
// or
432433
service: {
433434
name: "my-service-name",
434435
url: "http://example.com/graphql",
435436
headers: {
436437
cookie: "myCookieValue"
437438
}
439+
},
440+
441+
// or a local generated schema file
442+
service: {
443+
name: "my-service-name",
444+
localSchemaFile: "./path/to/schema.graphl"
438445
}
439446
}
440447
};
441448
```
442449

443450
## Service settings
444451

445-
The service config needs to know how to fetch the schema for that service. This can be done with either an endpoint config or a filepath of a generated SDL file
452+
The service config needs to know how to fetch the schema for that service. This can be done with either an endpoint config or a filepath of a generated SDL (Schema Definition Language) file, for example: `schema.json` or `schema.graphql`.
446453

447454
```js
448455
module.exports = {
449456
service: {
450457
name: "my-service",
458+
451459
// this is the default endpoint info
452460
endpoint: {
453461
url: "https://localhost:4000/graphql"
454462
},
455-
// or a local generated schema
456-
localSchemaFile: "./path/to/sdl.graphql"
463+
464+
// or a local generated schema file
465+
localSchemaFile: "./path/to/schema.graphl"
457466
}
458-
}
467+
};
459468
```
460469

461470
# Code Generation

0 commit comments

Comments
 (0)