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

Use GraphQL for rendering Role page #3845

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Use GraphQL for rendering Role page #3845

wants to merge 9 commits into from

Commits on Nov 13, 2024

  1. Swap instance variable for local

    The instance variable isn't being used anywhere
    
    Co-authored-by: Ynda <[email protected]>
    mike3985 and yndajas committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    1900795 View commit details
    Browse the repository at this point in the history
  2. Move Role's presentation into a presenter

    Co-authored-by: Ynda <[email protected]>
    mike3985 and yndajas committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    325b099 View commit details
    Browse the repository at this point in the history
  3. Introduce Role page feature spec

    Exercising the role page with a few alternate content item
    configurations, hopefully triggering all combinations of partials to be
    rendered
    
    Co-authored-by: Ynda <[email protected]>
    mike3985 and yndajas committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    d601808 View commit details
    Browse the repository at this point in the history
  4. Define sub-presenters for Role's links

    Negating the use of hashes in the roles views.
    
    We've taken this opportunity to flatten some of the data that was in
    those hashes -- see the removal of the "details" layers.
    
    We're working towards introducing Publishing API's GraphQL endpoint as
    an alternate source for Role data. If the current approach is preferred,
    we'd be happy to build hashes from that new data, and to have those
    hashes reflect internal details specific to the ContentItem data. But
    since it didn't appear difficult to change, we thought we'd have a go at
    making something more neutral.
    
    ---
    
    We're not sure yet about the use of Data objects here. It seemed like
    a nice idea to begin with but after it was finished and working we
    weren't completely convinced that it wasn't a bit "too smart".
    
    Co-authored-by: Ynda <[email protected]>
    mike3985 and yndajas committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    db64da0 View commit details
    Browse the repository at this point in the history
  5. Add Graphql query for Role

    We're trialling Publishing API's GraphQL endpoint as a source for Role
    data like we did recently for the World Index
    
    Co-authored-by: Ynda <[email protected]>
    mike3985 and yndajas committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    e796d5c View commit details
    Browse the repository at this point in the history
  6. Add prime-minister role test fixture

    This fixture reflects how Publishing API's GraphQL endpoint represents
    the prime-minister role
    
    Co-authored-by: Ynda <[email protected]>
    mike3985 and yndajas committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    ebfb868 View commit details
    Browse the repository at this point in the history
  7. Introduce a Graphql-specific Role model

    Co-authored-by: Ynda <[email protected]>
    mike3985 and yndajas committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    4f05e86 View commit details
    Browse the repository at this point in the history
  8. Introduce a GraphQL-specific Role presenter

    Co-authored-by: Ynda <[email protected]>
    mike3985 and yndajas committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    1d843cc View commit details
    Browse the repository at this point in the history
  9. Check for GraphQL feature flag in Roles controller

    Co-authored-by: Ynda <[email protected]>
    mike3985 and yndajas committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    46cc139 View commit details
    Browse the repository at this point in the history