tiled icon indicating copy to clipboard operation
tiled copied to clipboard

GraphQL Implementation

Open dylanmcreynolds opened this issue 4 years ago • 2 comments

This draft PR represents thoughts related to creating a GraphQL search implementation in tiled. I'm creating the PR very early in development to maximize feedback.

This uses the Ariadne graphql package, which focuses on "schema first" development.

Currently, this only supports a "hello world" endpoint at /graphql.

The general theory is that this will always support a single endpoint into which Tree-specific schemas and code can be registered at startup. At app startup, the code in graphql.py will be notified of the root tree object. With that, it will interrogate top level nodes for registered queries. A gqlquery will provide:

  • a query part (possibly a graphql fragment
  • one or more resolver iplementations

In this way, developers who register tiled a Tree will be able to optionally specify a graphql schema (string) and implementation (python).

dylanmcreynolds avatar Dec 05 '21 21:12 dylanmcreynolds

I like this approach. It fits in well with our existing patterns.

danielballan avatar Dec 08 '21 13:12 danielballan

Power-cycled to re-run CI now that docs build has been fixed on main.

danielballan avatar Dec 10 '21 12:12 danielballan

I'm going to close this as stale. I am still interested in understanding use cases for GraphQL in Tiled.

danielballan avatar May 10 '24 13:05 danielballan