Inspiration

I am new to GraphQL. I think it will be nice have a dApp for users to find Keta recipes implemented with subgraph.

What it does

This will be a simple dApp which connect to the Keto recipes subgraph. The app shows Keto recipes. Users can sort recipes by ID, owner, image and recipes' name. There are filters which allow user select which recipes they want to view. Available filters include recipes with name, with image, with instruction steps and with ingredients. For example, selecting the "With instructions" checkbox will show those recipes which have instruction step; those without will not appear.

How I built it

I learnt from the Quick Start guide at thegraph.com. The project has two parts. Part one is the recipes subgraph and part two is the dApp which interfaces with part one's subgraph.

Each of these parts has its own repo. You can get the repo links below.

Challenges I ran into

(1) The following error happend while passing string[] to constructor in Solidity. Use "pragma experimental ABIEncoderV2;" to enable the feature.

"TypeError: This type is only supported in the new experimental ABI encoder. "

(2) Getting familiar to the GraphQL and finding out what files are being generated by "yarn codegen"

Accomplishments that I'm proud of

I deployed the recipes subgraph and modified the dApp for the recipes with additional filteres.

What I learned

I learned GraphQL which is new to me and deployed the recipes subgraph to a Hosted Service.

What's next for Keto Recipes SubGraph

There are at least two enhancements that can be made.

(1) Currenlty the subgraph is very simple. Future version should include more complex model for the recipes subgraph.

(2) Add more functionalities to the dApp, in parallel to the complexities of the subgraph model in part (1).

Built With

Share this project:

Updates