dipdup-io / dipdup

Modular framework for creating selective indexers and featureful backends for dapps
https://dipdup.io
MIT License
92 stars 51 forks source link

Generic GraphQL datasource #281

Open droserasprout opened 2 years ago

droserasprout commented 2 years ago

What feature would you like to see in DipDup?

graphql datasource for Hasura instances and other GQL API.

Why do you need this feature, what's the use case?

More integrations - more flexibility.

Is there a workaround currently?

http datasource and manual requests.

Ndifreke000 commented 1 week ago

Hello, can i get the documentation for this project??

Ndifreke000 commented 1 week ago

Hello, can i get the documentation for this project??

Ndifreke000 commented 1 week ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

With my background in Python, SQL, and open-source contributions, I possess the skills and passion necessary to successfully implement this feature. My commitment to improving flexibility and integration options aligns perfectly with the goals of this project. I am excited about the opportunity to enhance DipDup’s capabilities and provide users with more options for data integration

How I plan on tackling this issue

I propose developing a generic GraphQL datasource for seamless integration with Hasura instances and other GraphQL APIs, enhancing DipDup's flexibility and integration capabilities. I will start by researching existing implementations to understand user needs and then design a datasource that handles queries and mutations, reducing the complexity of integration. Comprehensive documentation will be created to guide users on setup and usage, along with examples and troubleshooting tips. Rigorous testing will ensure compatibility with existing features, and I will engage with the DipDup community for feedback to refine the implementation and enhance the overall user experience.

gregemax commented 1 week ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I have experience in Python and working with various APIs, including GraphQL. My background in developing integrations allows me to effectively enhance systems for better functionality and flexibility.

How I plan on tackling this issue

I would start by researching existing GraphQL integrations and identifying the requirements for implementing a datasource for Hasura and other GraphQL APIs. Then, I would design the architecture for the datasource, ensuring it can handle various GQL operations efficiently. Finally, I would write comprehensive documentation to assist users in utilizing this new feature.

gregemax commented 1 week ago

Could you clarify the specific features and key functionalities you're looking for in the GraphQL datasource for Hasura and other GQL APIs? Also, could you point me to the relevant file where I should integrate the datasource? Additionally, are there any other important details, such as best practices, performance considerations, or other project-specific guidelines, that I should be aware of before I start?

droserasprout commented 4 days ago

@gregemax Sorry it took me so long to reply! One of usecases for this new datasource is querying one DipDup indexer instance from another one. You can use this API as reference: https://mainnet.starknet.dipdup.net/v1/graphql. Currently this task requires creating a generic http datasource and running queries manually with .request(). So, we need a wrapper to make it more convenient and provide some helpers like running queries from graphql/ directory.