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

architect the graphql files folder structure #33

Open
gosuto-inzasheru opened this issue Aug 23, 2023 · 1 comment
Open

architect the graphql files folder structure #33

gosuto-inzasheru opened this issue Aug 23, 2023 · 1 comment

Comments

@gosuto-inzasheru
Copy link
Contributor

          nomenclature might be a bit confusion, but doing a bit of research on the react-f/e directory structure components living in `queries/` are those reading from on-chain, triggering txs, use to call subgraphs, endpoints etc (seems the "ideal" state for abstracting that logic) and then importing those in `components/`

however, what i realised regarding the "query" itself *.graphql files. it is that it could live in subgraphs/smartgarden-optimism-gauges/graphql (queries scope per subgraph) and then using the right config for codegen.yml. It could auto-generate the function helpers that we could import later on the queries/ files from subgraphs/smartgarden-optimism-gauges/generated/graphql.tsx. in that way all (gql, *.graphql) will be isolated per subgraph directory we have and then elsewhere could be imported from there

we will need to investigate if that could be create out of the box using, something from this or combination of:

Originally posted by @petrovska-petro in #25 (comment)

@gosuto-inzasheru
Copy link
Contributor Author

to be frank, for me it feels more logical for the gql queries to live in the frontend folder, since they are part of the frontend. the subgraphs folders can then be thought of as the backend.

lets see, not sure i understand your codegen.yml idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant