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

[MINT-2720] Data Exchange Approach #1380

Conversation

OddTomBrooks
Copy link
Contributor

@OddTomBrooks OddTomBrooks commented Sep 24, 2024

MINT-2720

Description

Created Data Exchange Approach in accordance with Figma spec.

  • Backend
    • GQL
    • SQL
    • Store Methods
    • Postman
    • Resolvers

How to test this change

  1. Bring up containers
  2. Create a model plan with postman
  3. Validate that the model plan has a Data Exchange Approach task list section
  4. Update corresponding Data Exchange Approach task list section with postman

PR Author Checklist

  • I have provided a detailed description of the changes in this PR.
  • I have provided clear instructions on how to test the changes in this PR.
  • I have updated tests or written new tests as appropriate in this PR.
  • Updated the Postman Collection if necessary.

PR Reviewer Guidelines

  • It's best to pull the branch locally and test it, rather than just looking at the code online!
  • When approving a PR, provide a reason why you're approving it
    • e.g. "Approving because I tested it locally and all functionality works as expected"
    • e.g. "Approving because the change is simple and matches the Figma design"
  • Don't be afraid to leave comments or ask questions, especially if you don't understand why something was done! (This is often a great time to suggest code comments or documentation updates)
  • Check that all code is adequately covered by tests - if it isn't feel free to suggest the addition of tests.

OddTomBrooks and others added 16 commits July 5, 2024 02:07
* feat: added feature migration, data models, gql

* chore: updated sql queries

* feat: several major improvements to first semi-functional data exchange approach in-app notification

* chore: updated postman collection to get all notifications

* chore: updated frontend gql and backend gql for user notification preferences

* chore: added simple resolver helper to dispatch emails and email test to validate email templates

* chore: removed resolved question

* chore: Reset all frontend files to main branch as we split the frontend work to EASI-4491

* chore: reran gql gen

* chore: email unit test for data exchange approach completed

* chore: removed unnecessary Scan and Value methods

* chore: added unit test for activity data exchange complete notification

* chore: implemented resolver for data exchange approach completed notification preferences

* fix: updated various test definitions to match new user account preferences spec

* chore: removed outdated comment

* chore: updated postman collection renaming markedCompletedBy -> markedCompleteBy

* chore: converted data exchange approach complete meta to id
# Conflicts:
#	cmd/dbseed/main.go
#	cmd/test_email/main.go
#	pkg/email/template_service_impl.go
#	pkg/graph/generated/generated.go
#	src/gql/gen/graphql.ts
…ta_exchange_approach

# Conflicts:
#	MINT.postman_collection.json
#	cmd/dbseed/main.go
#	cmd/test_email/main.go
#	pkg/email/template_service_impl.go
#	pkg/graph/generated/generated.go
#	pkg/graph/resolvers/activity.resolvers.go
#	pkg/graph/resolvers/added_as_collaborator_email_test.go
#	pkg/graph/resolvers/data_exchange_approach_helper.go
#	pkg/graph/resolvers/plan_collaborator_test.go
#	pkg/graph/resolvers/resolver_test.go
#	pkg/graph/resolvers/resolver_test_utilities.go
#	pkg/graph/resolvers/user_notification_preferences.resolvers.go
#	pkg/graph/schema/types/activity.graphql
#	pkg/models/data_exchange_approach.go
#	pkg/models/data_exchange_approach_completed_activity_meta.go
#	pkg/notifications/data_exchange_approach_completed.go
#	src/gql/gen/graphql.ts
Copy link
Contributor

@StevenWadeOddball StevenWadeOddball left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Tom, this is just a high level review of the data type in graphql. There is some deviation from FIGMA that I wanted to call out now instead of waiting till the PR is promoted.

@OddTomBrooks OddTomBrooks marked this pull request as ready for review September 27, 2024 18:38
@OddTomBrooks OddTomBrooks requested review from a team as code owners September 27, 2024 18:38
@OddTomBrooks OddTomBrooks requested review from StevenWadeOddball and removed request for a team September 27, 2024 18:38
pkg/graph/schema/types/plan_data_exchange_approach.graphql Outdated Show resolved Hide resolved
pkg/storage/plan_data_exchange_approachStore.go Outdated Show resolved Hide resolved
ClayBenson94 and others added 6 commits September 30, 2024 14:53
… MarkedByDts rather than explicit boolean field
…:CMSgov/mint-app into feature/MINT-2720_data_exchange_approach

# Conflicts:
#	migrations/V176__Add_Data_Exchange_Approach.sql
@ClayBenson94 ClayBenson94 self-requested a review October 1, 2024 17:33
Copy link
Contributor

@patrickseguraoddball patrickseguraoddball left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm getting this error when creating a model plan and trying to query status

{
  "errors": [
    {
      "message": "the requested element is null which the schema does not allow",
      "path": [
        "modelPlan",
        "dataExchangeApproach",
        "status"
      ]
    }
  ],
  "data": null
}

@ClayBenson94
Copy link
Collaborator

ClayBenson94 commented Oct 1, 2024

I'm getting this error when creating a model plan and trying to query status

{
  "errors": [
    {
      "message": "the requested element is null which the schema does not allow",
      "path": [
        "modelPlan",
        "dataExchangeApproach",
        "status"
      ]
    }
  ],
  "data": null
}

@OddTomBrooks can you add a NOT NULL and DEFAULT value in the migration to avoid this?

EDIT: Wait, that's already there. Not sure why this'd come back null in GQL 🤔

EDIT 2: Looks like we might need to add status to the return values of the SQL scripts that do CRUD operations for the data exchange table

Copy link
Contributor

@StevenWadeOddball StevenWadeOddball left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Tom, I think this is in a good state to merge to a feature branch. There are some thing that I think can be updated, but I think it would be better to merge this, and iterate on another PR.

I'd like to revisit the core struct before this targets main. I left a comment for a few other things I noticed, but as I don't think they will affect the front end, I think they can be addressed later.

Copy link
Contributor

@StevenWadeOddball StevenWadeOddball Oct 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A note in case this file gets touched again, we have sqlutils.Get and Select procedures to handle most of the boilerplate for database calls. It can replace much of the existing code to prepare named statements here.

@ClayBenson94 ClayBenson94 dismissed stale reviews from patrickseguraoddball and themself October 2, 2024 14:35

changes made

@OddTomBrooks OddTomBrooks merged commit efc5617 into feature/MINT-2720_data_exchange Oct 2, 2024
9 of 11 checks passed
@OddTomBrooks OddTomBrooks deleted the feature/MINT-2720_data_exchange_approach branch October 2, 2024 14:37
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.

4 participants