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

graphql(attachment): prevent null errors #9395

Merged

Conversation

tchak
Copy link
Member

@tchak tchak commented Aug 7, 2023

No description provided.

@what-the-diff
Copy link

what-the-diff bot commented Aug 7, 2023

PR Summary

  • Enhancements to stored_query.rb

    • The code in app/graphql/api/v2/stored_query.rb now tracks additional key bits of information related to Dossier, String Value, and File fragments for better data transparency and sortability:
      • The type of these fragments (__typename)
      • The time when specific String Value and File fragments were last updated or created (updatedAt, createdAt)
    • The PageInfoFragment now logs the startCursor, improving page navigation and item location in large datasets.
  • Improvement in attachment.rb

    • Updates to app/graphql/extensions/attachment.rb ensure better data effectiveness and memory utilization:
      • The after_resolve method now compacts the attachments array after resolution, which means it removes any null or unnecessary values, hence optimizing memory usage.

@tchak tchak added the bug label Aug 8, 2023
@tchak tchak added this pull request to the merge queue Aug 8, 2023
Merged via the queue into demarches-simplifiees:main with commit 202e310 Aug 8, 2023
@tchak tchak deleted the graphql-improuve-stored-query branch August 8, 2023 14:36
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.

2 participants