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: docs/graphql.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,11 @@ Several API formats and architecture including [GraphQL](https://graphql.org/),
4
4
5
5
By using HTTP/2 Server Push, Vulcain fixes most problems caused by compound documents and sparse fieldsets based formats such as GraphQL and JSON:API:
6
6
7
-
* Because each pushed resource is sent in a separate HTTP/2 stream (HTTP/2 multiplexing), related resources can be sent in parallel to the client thanks
8
-
* While embedding resources is a forced push (the client receive the full JSON documents, even if it already has some parts of it), HTTP/2 Server Push allows the client [to cancel the push of resources it already has](cache.md), saving bandwidth and improving performance
9
-
* Consequently, clients and network intermediates (such as [Varnish cache](cache.md)), can store each resource in a specific cache, while resource embedding only allows to have the full big JSON document in cache, [cache invalidation](https://en.wikipedia.org/wiki/Cache_invalidation) is then more efficient with Vulcain, and can be done at the HTTP level
7
+
* Because each pushed resource is sent in a separate HTTP/2 stream (HTTP/2 multiplexing), related resources can be sent in parallel to the client.
8
+
* While embedding resources is a forced push (the client receive the full JSON documents, even if it already has some parts of it), HTTP/2 Server Push allows the client [to cancel the push of resources it already has](cache.md), saving bandwidth and improving performance.
9
+
* Consequently, clients and network intermediates (such as [Varnish cache](cache.md)), can store each resource in a specific cache, while resource embedding only allows to have the full big JSON document in cache, [cache invalidation](https://en.wikipedia.org/wiki/Cache_invalidation) is then more efficient with Vulcain, and can be done at the HTTP level.
10
10
11
-
Specifically with GraphQL, using cache mechanisms provided by the HTTP protocol isn't easy (`POST`request cannot be cached)
11
+
Specifically with GraphQL, using cache mechanisms provided by the HTTP protocol isn't easy (`POST`requests cannot be cached).
12
12
13
13
## Using GraphQL as Query Language for Vulcain
14
14
@@ -22,11 +22,11 @@ Thanks to `apollo-link-rest` you can write your request in GraphQL, use all [the
22
22
23
23
This approach also fixes [all the problems coming with using GraphQL server-side](https://dunglas.fr/2018/03/symfonylive-paris-slides-rest-vs-graphql-illustrated-examples-with-the-api-platform-framework/)!
24
24
25
-
Note: a higer-level library dedicated to Vulcain is being written.
25
+
Note: a higher-level library dedicated to Vulcain is being written.
26
26
27
27
## Type System and Introspection
28
28
29
-
Vulcains focuses on solving the under-fetching and the over-fetching problems. It's out of Vulcain's scope to provide a type system and an introspection mechanism.
29
+
Vulcain focuses on solving the under-fetching and the over-fetching problems. It's out of Vulcain's scope to provide a type system and an introspection mechanism.
30
30
However, Vulcain has been designed to play very well with existing formats providing these capabilities.
31
31
32
32
For hypermedia APIs, we strongly recommend to use [W3C's JSON-LD](https://json-ld.org/spec/latest/json-ld-api-best-practices/) along with [the Hydra Core Vocabulary](http://www.hydra-cg.com/). For less advanced non-hypermedia APIs, we recommend [OpenAPI](https://www.openapis.org/) (formerly known as Swagger).
0 commit comments