FuelLabs / fuel-core

Rust full node implementation of the Fuel v2 protocol.
Other
58.08k stars 2.77k forks source link

Rust APIs in `FuelService` to communicate with service layer #1127

Closed bvrooman closed 1 week ago

bvrooman commented 1 year ago

Currently, services in fuel-core, such as the Tx Pool, are invoked directly by GraphQL resolvers at the server API level. This creates a tight coupling between GraphQL and the services. Instead, we want to abstract service layer interaction by introducing a Rust API that has parity with the GraphQL API.

GraphQL resolvers can then use this API to talk indirectly with the needed services (see #1123)

Acceptance Criteria:

MitchTurner commented 5 months ago

This all makes a lot of sense. Just something to keep in mind: we already have a bunch of types working up to the GraphQL types, and we should carefully decide if the existing types should be on the Rust API interface or if we need new types to insulate ourselves from coupling.

xgreenx commented 1 week ago

This is already resolved since we used ports for GraphQL service