Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rust APIs in FuelService to communicate with service layer #1127

Closed
4 tasks
bvrooman opened this issue Apr 12, 2023 · 2 comments
Closed
4 tasks

Rust APIs in FuelService to communicate with service layer #1127

bvrooman opened this issue Apr 12, 2023 · 2 comments
Labels
graphql-api Affects API of the GraphQL

Comments

@bvrooman
Copy link
Contributor

bvrooman commented Apr 12, 2023

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:

  • All GraphQL APIs are duplicated in a Rust API in FuelService to provide feature-parity
  • All services are removed from async-graphql server context
  • FuelService (or SharedData) is available to the async-graphql server context
  • No GraphQL resolvers talk directly to service layer components
@bvrooman bvrooman changed the title Move all APIs to FuelService Rust level APIs in FuelService to communicate with service layer Apr 13, 2023
@bvrooman bvrooman changed the title Rust level APIs in FuelService to communicate with service layer Rust APIs in FuelService to communicate with service layer Apr 13, 2023
@bvrooman bvrooman self-assigned this Apr 17, 2023
@bvrooman bvrooman mentioned this issue Apr 21, 2023
4 tasks
@MitchTurner
Copy link
Member

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
Copy link
Collaborator

xgreenx commented Sep 26, 2024

This is already resolved since we used ports for GraphQL service

@xgreenx xgreenx closed this as completed Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
graphql-api Affects API of the GraphQL
Projects
None yet
Development

No branches or pull requests

3 participants