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

feat(conversation): add conversation route handling in mis #872

Merged
merged 7 commits into from
Sep 4, 2024

Conversation

atierian
Copy link
Member

@atierian atierian commented Sep 4, 2024

Description of changes

  • Adds handling of conversation directives for model introspection schema.

A note on breaking changes

I've confirmed with the Console team and tested Data Schema myself that this change doesn't break consumers. Unknown keys, such as conversations and generations (#869) are ignored by both consumers. However, a consumer of codegen that:

  • uses a version of codegen without knowledge of the @conversation or @generation directive

and

  • generates the model introspection schema based on an Ampilfy SDL GraphQL schema containing a @conversation or @generation directive

will break because codegen isn't aware of these directives.

For Data Schema, this in unproblematic. Customers won't be able to define conversation or generation routes in their schema without using (transitively) a version of amplify-graphql-directives that defines these directives.

For Console, this could be problematic for customers that define conversation or generation routes and use data manager in the console. The console team is aware of the impending releases and will work on updating their packages.

Codegen Paramaters Changed or Added

conversations key within MIS.

Issue #, if available

N/A

Description of how you validated changes

Automated snapshot and manual E2E tests.

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)
  • Breaking changes to existing customers are released behind a feature flag or major version update
  • Changes are tested using sample applications for all relevant platforms (iOS/android/flutter/Javascript) that use the feature added/modified
  • Changes are tested on windows. Some Node functions (such as path) behave differently on windows.
  • Changes adhere to the GraphQL Spec and supports the GraphQL types type, input, enum, interface, union and scalar types.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@atierian atierian requested review from a team as code owners September 4, 2024 02:07
}

/**
* Generates a conversation model schema.
Copy link
Member

Choose a reason for hiding this comment

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

As discussed, let's add a note here that this duplicates the conversation model creation logic in the transformer, and the two should be evolved in parallel. (Future PR is fine)

@atierian atierian merged commit b4821bd into feat/ai Sep 4, 2024
3 checks passed
@atierian atierian deleted the ai-conversation-mis branch September 4, 2024 19:10
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