-
Notifications
You must be signed in to change notification settings - Fork 199
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
fix(api): support query predicate Temporal.DateTime, fix integ tests #508
Conversation
ca6a803
to
9860fd1
Compare
AmplifyPlugins/API/AWSAPICategoryPluginFunctionalTests/AnyModelIntegrationTests.swift
Outdated
Show resolved
Hide resolved
...ugins/API/AWSAPICategoryPluginFunctionalTests/GraphQLModelBased/GraphQLModelBasedTests.swift
Outdated
Show resolved
Hide resolved
...ugins/API/AWSAPICategoryPluginFunctionalTests/GraphQLModelBased/GraphQLModelBasedTests.swift
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing the tests. I requested to change every occurrence of Temporal.DateTime(Date())
and Temporal.DateTime.now()
to simply .now()
.
Other than that, lgtm!
let originalPost = Post(title: "Post title", | ||
content: "Original post content as of \(Date())", | ||
createdAt: Date()) | ||
let originalPost = AmplifyTestCommon.Post(title: "Post title", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a conflict with Post
so you needed to use the fully qualified name? I wonder if we could remove the conflict instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i did some clean up here and removed the non-Model based Blog/Post/Comment types which have tests that were also removed (they were disabled, other Model based integ tests cover the same scenario) so that we can remove the need for the fully qualified name here and rest of the files
c9e9ae8
to
1d22a27
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just one last request: there are some minor indentation issues. I wonder if SwiftFormat is running for this target?
Anyway, other than that, it lgtm!
@@ -20,7 +20,7 @@ type Comment @model { | |||
id: ID! | |||
content: String! | |||
createdAt: AWSDateTime! | |||
post: Post @connection(name: "PostComment") | |||
post: Post! @connection(name: "PostComment") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice! :)
let originalPost = Post(title: "Post title", | ||
content: "Original post content as of \(Date())", | ||
createdAt: Date()) | ||
createdAt: .now()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the line above
content: "Original post content as of \(Date())",
with the string interpolation is what's causing xcode to have some sort of indentation bug there. when i remove it and CMD+I on the createdAt
line, it places it in line with the title and content parameters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed by creating some variables
Thanks for looking, i saw some indentation issues too when i ran CMD+i, let me take a look again before i merge it in |
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.