Skip to content

fix: select correct columns when pulling attestations from db#279

Merged
Jipperism merged 1 commit into
developfrom
fix/eas_schema_queries
Apr 7, 2025
Merged

fix: select correct columns when pulling attestations from db#279
Jipperism merged 1 commit into
developfrom
fix/eas_schema_queries

Conversation

@Jipperism

@Jipperism Jipperism commented Apr 4, 2025

Copy link
Copy Markdown
Contributor

Fixes a bug where the schema_uid was not selected correctly, which resulted in errors when fetching eas_schema using graphql as it's non-nullable.

NOTE: Querying attestations by metadata is broken, as it was before. I spent some time trying to fix this but ran into issues. I think it would be more time-efficient to revisit that after #263 has been merged. That issue is related to nested inner joins, eg attestations joins claims joins metadata. Created #280 to track that.

@github-actions

github-actions Bot commented Apr 4, 2025

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 25.09% (🎯 24%) 1094 / 4360
🟢 Statements 25.09% (🎯 24%) 1094 / 4360
🟢 Functions 62.1% (🎯 59%) 59 / 95
🟢 Branches 72.87% (🎯 72%) 180 / 247
File CoverageNo changed files found.
Generated in workflow #81 for commit 0975e42 by the Vitest Coverage Report Action

Fixes a bug where the schema_uid was not selected correctly, which
resulted in errors when fetching eas_schema using graphql as it's
non-nullable.
@bitbeckers

Copy link
Copy Markdown
Collaborator

@Jipperism

I think it would be more time-efficient to revisit that after #263 has been merged.

That would simple mean it won't be supported in the V1 API, but only V2?

@Jipperism

Copy link
Copy Markdown
Contributor Author

To test, try to query an attestation with eas_schema on staging/prod graphql ui, vs when running locally using this branch, so this query:

{
  attestations {
    data {     
      schema_uid
      eas_schema {
        chain_id
      }
    }
  }
}

succeeds on http://localhost:4000/v1/graphql, but fails on https://staging-api.hypercerts.org/v1/graphql. @bitbeckers

@Jipperism

Copy link
Copy Markdown
Contributor Author

That would simple mean it won't be supported in the V1 API, but only V2?

Yes, that could be reasonable I think? And then we should probably remove the args from the v1 API, so it doesn't seem like you'd be able to query by metadata? We haven't heard about it being broken yet, so my guess is that this functionality is not being used at the moment by api consumers?

@Jipperism Jipperism merged commit f3470e0 into develop Apr 7, 2025
@Jipperism Jipperism deleted the fix/eas_schema_queries branch May 17, 2025 14:56
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

Successfully merging this pull request may close these issues.

2 participants