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

OS-1061: Add scripts to generate introspection schema #566

Merged
merged 9 commits into from
Apr 17, 2024

Conversation

josemarinas
Copy link
Contributor

@josemarinas josemarinas commented Apr 9, 2024

Description

Currently the introspection schema json was generatated from the schema.graphql file. However this wasnt the correct form of doing it because it added some types that broke the subgraph deployment and the whole schema wasent available.

Subraph generates an eschema on top of your schema.graphql and we dont have access to this schema before deploying the subgraph itself, so we needed to query the subgraph to get the full schema after it was deployed.

We had 2 options here either calling the deployecd subgraph in alchemy or generating it from a locally deployed subgraph. The firs one wasnt the best option because we needed to deploy the whole subgraph to have the full schema, deploying locally we can get the same result without depending on external services.

What was done:

  • The docker-compose got updated, all the services got updated and the hardhat-node built fro the hardhat.Dockerfile got simplified to just deploy a HH node
  • An script that feches the local subgraph and saves the result to a json file
  • An script to do all this operations in one go

Some minor twaks were done in order to make this work.

Task ID: OS-1061

Type of change

See the framework lifecylce in packages/contracts/docs/framework-lifecycle to decide what kind of change this pull request is.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist:

  • I have selected the correct base branch.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • My changes generate no new warnings.
  • Any dependent changes have been merged and published in downstream modules.
  • I ran all tests with success and extended them if necessary.
  • I have updated the CHANGELOG.md file in the root folder.
  • I have updated the DEPLOYMENT_CHECKLIST file in the root folder.
  • I have updated the UPDATE_CHECKLIST file in the root folder.
  • I have updated the Subgraph and added a QA URL to the description of this PR.

@banasa44 banasa44 self-requested a review April 11, 2024 08:05
banasa44
banasa44 previously approved these changes Apr 11, 2024
@josemarinas josemarinas marked this pull request as ready for review April 15, 2024 09:34
@josemarinas josemarinas requested review from Rekard0 and banasa44 April 16, 2024 10:53
@josemarinas josemarinas merged commit c27df03 into develop Apr 17, 2024
29 checks passed
@josemarinas josemarinas deleted the f/OS-1061-add-docker-compose-introspection-json branch April 17, 2024 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants