p } A server interprets a GraphQL query and

p { margin-bottom: 0.25cm; line-height: 120%; }a:link { }

p { margin-bottom: 0.25cm; line-height: 120%; }a:link { }

We Will Write a Custom Essay Specifically
For You For Only $13.90/page!


order now

A
server interprets a GraphQL query and the string returns it in a
specific format that can be understood 2. GraphQL does not require
a specific way to be transported (such as using a HTTP protocol). The
parser is situated in the application-layer protocol. Specific
strings are parsed by the server 1. Once the parsing has taken
place a tagged template function is exposed for parsing the GraphQL
queries which outputs a function that describes the query. The
generation of the abstract syntax tree (AST) is exposed by the parser
at a lower level API.

It
is possible for a query to be incorrect. If any syntax errors that
occur within the parsing then the server terminates the execution and
this is returned back to the the client. Validation is the next step
that makes sure the query is successfully parsed. Various checks are
done by the server automatically in this process, such as: whether
the String is a certain query type, argument validation of a string,
whether it consists of a return type and various other checks take
place. If and only if the validation is done well, then the server
executes the query 1.

The
purpose of the schema is to tell the server what queries can be
executed and the relation of different types by the clients. The
resolve functions details how the types and fields are linked to the
various back ends and hides all of the back end complexities from
clients. It doesn’t matter how many back ends that exist within the
app, the client will see a single GraphQL endpoint with a simple,
self-documenting API for the application 1.

1
– Helfer, J.
2016. GraphQL
explained.

ONLINE
Available at:
https://dev-blog.apollodata.com/graphql-explained-5844742f195e.

Accessed
09
January 2018.

2
– Nick
Schrock, N.
2015. GraphQL
Introduction.

ONLINE
Available at:
https://reactjs.org/blog/2015/05/01/graphql-introduction.html.

Accessed
12
January 2018.

3
– Cailhol,
F.
2015. Graphql-parser.
Experimental Facebook’s GraphQL parser.

ONLINE
Available at: https://www.npmjs.com/package/graphql-parser.
Accessed
12
January 2018.

4
– Stubailo,
S. (2018). Native code generation at Facebook – Apollo GraphQL.
online Apollo GraphQL. Available at:
https://dev-blog.apollodata.com/native-code-generation-at-facebook-7d6d0db4f3ee

Accessed
10
Jan. 2018.

5
– Simha,
D. (2018). GraphQL
Code-Gen 1.0 – Dotan Simha – Medium.
online Medium. Available at:
https://medium.com/@dotansimha/graphql-code-generator-a34e3785e6fb

Accessed
15 Jan. 2018.