@@ -14,15 +14,22 @@ Turn complex GraphQL queries into optimized database queries.
14
14
pip install graphql-compiler
15
15
```
16
16
17
+ ## Quick Overview
18
+
19
+ Through the GraphQL compiler, users can write powerful queries that uncover
20
+ deep relationships in the data while not having to worry about the underlying database query
21
+ language. The GraphQL compiler turns read-only queries written in GraphQL syntax to different
22
+ query languages.
23
+
24
+ Furthermore, the GraphQL compiler validates queries through the use of a GraphQL schema
25
+ that specifies the underlying schema of the database. We can currently autogenerate a
26
+ GraphQL schema by introspecting an OrientDB database, (see [ Querying OrientDB with GraphQL] ( #querying-orientdb-with-graphql ) ).
27
+
28
+ In the near future, we plan to add schema autogeneration from SQLAlchemy metadata as well.
29
+
17
30
For a more detailed overview and getting started guide, please see
18
31
[ our blog post] ( https://blog.kensho.com/compiled-graphql-as-a-database-query-language-72e106844282 ) .
19
32
20
- To pretty-print GraphQL queries, use the included pretty-printer:
21
- ```
22
- python -m graphql_compiler.tool <input_file.graphql >output_file.graphql
23
- ```
24
- It's modeled after Python's ` json.tool ` , reading from stdin and writing to stdout.
25
-
26
33
## Table of contents
27
34
* [ Features] ( #features )
28
35
* [ Querying OrientDB with GraphQL] ( #querying-orientdb-with-graphql )
@@ -55,6 +62,7 @@ It's modeled after Python's `json.tool`, reading from stdin and writing to stdou
55
62
* [ End-To-End SQL Example] ( #end-to-end-sql-example )
56
63
* [ Configuring the SQL Database to Match the GraphQL Schema] ( #configuring-the-sql-database-to-match-the-graphql-schema )
57
64
* [ Miscellaneous] ( #miscellaneous )
65
+ * [ Pretty-Printing GraphQL Queries] ( #pretty-printing-graphql-queries )
58
66
* [ Expanding ` @optional ` vertex fields] ( #expanding-optional-vertex-fields )
59
67
* [ Optional ` type_equivalence_hints ` compilation parameter] ( #optional-type_equivalence_hints-parameter )
60
68
* [ FAQ] ( #faq )
@@ -1303,6 +1311,15 @@ At this point, the `animal` view can be used in the SQLAlchemy Table for the pur
1303
1311
1304
1312
## Miscellaneous
1305
1313
1314
+ ### Pretty-Printing GraphQL Queries
1315
+
1316
+ To pretty-print GraphQL queries, use the included pretty-printer:
1317
+ ```
1318
+ python -m graphql_compiler.tool <input_file.graphql >output_file.graphql
1319
+ ```
1320
+ It's modeled after Python's ` json.tool ` , reading from stdin and writing to stdout.
1321
+
1322
+
1306
1323
### Expanding [ ` @optional ` ] ( #optional ) vertex fields
1307
1324
Including an optional statement in GraphQL has no performance issues on its own,
1308
1325
but if you continue expanding vertex fields within an optional scope,
0 commit comments