that the value of a property field should be included in the output. schema, type_equivalence_hints = get_graphql_schema_from_orientdb_schema_data ( schema_data ) print ( print_schema ( schema )) # schema īecause no such edge can satisfy the directive, and no filtering happens. command ( ORIENTDB_SCHEMA_RECORDS_QUERY ) schema_data = # Step 2: Generate GraphQL schema from metadata. client = your_function_that_returns_an_orientdb_client () schema_records = client. from _printer import print_schema from graphql_compiler import ( get_graphql_schema_from_orientdb_schema_data, graphql_to_match ) from graphql_compiler.schema_ import ORIENTDB_SCHEMA_RECORDS_QUERY # Step 1: Get schema metadata from hypothetical Animals database. We hope to add more functionality over time.Įven though this example specifically targets an OrientDB database, it is meant as a genericĮnd-to-end example of how to use the GraphQL compiler. GraphQL Language Features: We prioritized and implemented a subset of all functionality supported by the GraphQL language. A subset of compiler features are available for Support for relational databases including PostgreSQL, MySQL, SQLite,Īnd Microsoft SQL Server is a work in progress. See the Execution model section for more details. With OrientDB, MATCH should be the preferred choice for most users, since it tends to run faster than gremlin, and has other desirable properties. Optional type_equivalence_hints compilation parameterĭatabases and Query Languages: We currently support a single database, OrientDB version 2.2.28+, and two query languages that OrientDB supports: the OrientDB dialect of gremlin, and OrientDB's own custom SQL-like query language that we refer to as MATCH, after the name of its graph traversal operator.A language service plugin complete and validate GraphQL query in TypeScript template strings. Configuring the SQL Database to Match the GraphQL Schema Click here to discover the best graphql tools on the web.In the near future, we plan to add schema autogeneration from SQLAlchemy metadata as well.įor a more detailed overview and getting started guide, please see GraphQL schema by introspecting an OrientDB database, (see End to End Example). That specifies the underlying schema of the database. The GraphQL compiler turns read-only queries written in GraphQL syntax to differentįurthermore, the GraphQL compiler validates queries through the use of a GraphQL schema Through the GraphQL compiler, users can write powerful queries that uncoverĭeep relationships in the data while not having to worry about the underlying database query Turn complex GraphQL queries into optimized database queries.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |