-
Notifications
You must be signed in to change notification settings - Fork 200
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
Add DataStore/API integration test for a model with all supported types #314
Comments
we should also make sure mutating and querying for AppSync Floats with values that are at the upper limit is working or if there are some limitations, document what is the maximum value possible |
This fixes problems reported in several issues: #111 #240 #246 #318 #314 **Notes:** - added support for SQLite to handle Enums - added support for SQLite to handle non-model types: - custom Codable structs - codable arrays - added tests to make sure the right values are represented as SQLite bindings - remove field type string representation - re-organized schema related files - add support for Enum and non-model types - remove commented code - fix SQLite Int64 precision - improve documentation and test cases - better error handling and parameter naming - addressed PR feedback - add tests for `AnyEncodable` - renamed variables for improved readability - improved error message - minor naming changes to address PR feedback - update cocoapods version to be in sync with master **Tests:** - added a model that has all types of fields to make it easier to visualize how data is represented on SQLite **Pending:** - More documentation - GraphQL clenup on API category
we could take https://github.com/aws-amplify/amplify-ios/blob/main/AmplifyTestCommon/Models/QPredGen.swift and use the schema
in both of the integration tests in DataStore and API |
Other possible scalars to test: https://docs.aws.amazon.com/appsync/latest/devguide/scalars.html Other scenarios could include all combinations of nullable fields. type TestModel @model {
id: ID!
testInt: Int!
nullableInt: Int
intList: [Int!]!
intNullableList: [Int!]
nullableIntList: [Int]!
nullableIntNullableList: [Int]
} Enums and nested types have also been problematic in the past so having tests for them might be useful. type EnumTestModel @model {
enumVal: TestEnum!
nullableEnumVal: TestEnum
enumList: [TestEnum!]!
enumNullableList: [TestEnum!]
nullableEnumList: [TestEnum]!
nullableEnumNullableList: [TestEnum]
}
enum TestEnum {
VALUE_ONE
VALUE_TWO
}
type NestedTypeTestModel @model {
nestedVal: Nested!
nullableNestedVal: Nested
nestedList: [Nested!]!
nestedNullableList: [Nested!]
nullableNestedList: [Nested]!
nullableNestedNullableList: [Nested]
}
type Nested {
valueOne: Int
valueTwo: String
} |
This issue is stale because it has been open for 14 days with no activity. Please, provide an update or it will be automatically closed in 7 days. |
This issue is being automatically closed due to inactivity. If you believe it was closed by mistake, provide an update and re-open it. |
This would be a follow up task after @drochetti's work Date/Enum/Primitive support, We should add an integration test which contains a model with all of the supported types
The text was updated successfully, but these errors were encountered: