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

Refactor detector GraphQL and implement journal detection type #92

Merged
merged 2 commits into from
Aug 26, 2024

Commits on Aug 16, 2024

  1. Move StandardIdentifiers to Detectors module

    Why these changes are being introduced:
    
    Since we created the `StandardIdentifiers` model, we started
    namespacing our detection models.
    
    Relevant ticket(s):
    
    Tangentially related to [TCO-50](https://mitlibraries.atlassian.net/browse/TCO-50)
    
    How this addresses that need:
    
    This adds the `Detectors` namespace to `StandardIdentifiers` to
    match our other detection models (`Journal` and `SuggestedResource`).
    
    Side effects of this change:
    
    Some cascading changes were made in Metrics::Algorithms and
    the SearchEventType GraphQL.
    jazairi committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    09b51c5 View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2024

  1. Refactor detector GraphQL and implement journal detection type

    Why these changes are being introduced:
    
    We've implemented a journal detection model but not the corresponding GraphQL. As this will be the second of many
    detectors, it also makes sense to reconsider how the detector GraphQL is modeled.
    
    Relevant ticket(s):
    
    * [TCO-50](https://mitlibraries.atlassian.net/browse/TCO-50)
    
    How this addresses that need:
    
    This makes `journals` and `standard_identifiers` fields within a new `DetectorsType`. Much like the `Detector` module,
    this new type is not to any ActiveRecord models and acts more as a namespace to contain the various detectors.
    
    Side effects of this change:
    
    * The graphql-ruby docs [advise against overusing JSON](https://graphql-ruby.org/api-doc/2.3.14/GraphQL/Types/JSON.html)
    as a GraphQL type, but this feels like a good use case for it.
    * I'm not certain whether my solution to the `detectors` field is idiomatic. It feels particularly odd given that,
    in the SearchEventType, there is a method for the `phrase` field that returns the same thing.
    * The gitignore file has been updated to ignore Lando config. This ended up being unrelated to this changeset, but it
    might be useful during cassette regeneration.
    jazairi committed Aug 23, 2024
    Configuration menu
    Copy the full SHA
    7083502 View commit details
    Browse the repository at this point in the history