Closed AlicanC closed 1 year ago
@ra0x3 thanks for having a look!
Most (if not all) unpolished parts are pending a discussion as you've guessed and it is about store::Data
.
In store::DataType
, for simplicity, I used our ABI types with the addition of a few necessities that are just Sway proposals ATM.
We should discuss and decide what types we should have. We already have an enum ColumnType
but all store::{Store, Data, Obj, Assoc}
are going to be very very hot and to achieve a stable and performant implementation we should restrict ourselves to a small amount of primitives just like we do for ABI types. (We can directly use those too. Maybe we should if we want to use FVM instead of WASM in the future?) Anything higher level can be defined at the schema level.
When we finalize store::DataType
and then store::Data
then a lot of code will be removed from the schema
module and it can finally be cleaned up from all the todo()!
s and such.
@AlicanC Gonna merge this so I can put up my PR on Monday - feel free to revert if you want :)
fuel-indexer-graphql-dyn
GraphQL Dyn is a library for building executable dynamic GraphQL schemas.
Dyn has two main parts: the
store::Store
and theschema::DynSchemaBuilder
. The schema builder is responsible for creating executableasync_graphql_dynamic::dynamic::Schema
instances from a dynamically definedschema::DynSchemaType
. Built schema executes GraphQL queries by fetching data from the store. The store is responsible for communicating with the underlying data source.Usage
Users of Dyn will need three things to get started:
With these implemented, you can create a dynamic schema and execute queries: