Skip to content

Commit

Permalink
fix: model transformer support condition (#7935)
Browse files Browse the repository at this point in the history
* fix(graphql-model-transformer): fixed input type field generation for enum types

* fix(graphql-model-transformer): implemented support for nested non model fields

* fix(graphql-model-transformer): implemented support for nested non model fields

* fix(graphql-model-transformer): fixed input type field generation for enum types

* fix(graphql-model-transformer): implemented support for nested non model fields

* fix(graphql-model-transformer): fixed input type field generation for enum types

* fix(graphql-model-transformer): implemented support for nested non model fields

* fix(graphql-model-transformer): fixed input type field generation for enum types

* fix(graphql-model-transformer): implemented support for nested non model fields

* fix(graphql-model-transformer): fixed input type field generation for enum types

* fix(graphql-model-transformer): implemented support for nested non model fields

* fix(graphql-model-transformer): fixed input type field generation for enum types

* fix(graphql-model-transformer): implemented support for nested non model fields

* fix(graphql-model-transformer): fixed input type field generation for enum types

* fix(graphql-model-transformer): implemented support for nested non model fields

* fix(graphql-model-transformer): fixed input type field generation for enum types

* chore(graphql-model-transformer): added validateModelSchema to unit test

* fix(graphql-model-transformer): implemented support for nested non model fields

* fix(graphql-model-transformer): fixed input type field generation for enum types

* fix(graphql-model-transformer): implemented support for nested non model fields

* fix(graphql-model-transformer): fixed input type field generation for enum types

* fix(graphql-model-transformer): implemented support for nested non model fields

* fix(graphql-model-transformer): fixed input type field generation for enum types

* fix(graphql-model-transformer): implemented support for nested non model fields

* fix(graphql-model-transformer): fixed input type field generation for enum types

* chore(graphql-model-transformer): added validateModelSchema to unit test

* chore(graphql-model-transformer): added validateModelSchema to unit test

* fix(graphql-model-transformer): implemented support for nested non model fields

* fix(graphql-model-transformer): fixed input type field generation for enum types

* fix(graphql-model-transformer): implemented support for nested non model fields

* fix(graphql-model-transformer): fixed input type field generation for enum types

* fix(graphql-model-transformer): implemented support for nested non model fields

* fix(graphql-model-transformer): fixed input type field generation for enum types

* fix(graphql-model-transformer): implemented support for nested non model fields

* fix(graphql-model-transformer): fixed input type field generation for enum types

* chore(graphql-model-transformer): added validateModelSchema to unit test

* chore(graphql-model-transformer): fixed merge conflicts

* fix(graphql-model-transformer): fixed @model transformer advanced subscriptions

* fix(graphql-model-transformer): fixed @model model sort direction

* fix(graphql-model-transformer): fixed @model model sort direction

* chore(graphql-model-transformer): organized imports

* fix(graphql-model-transformer): changes to @model v2 transformer to support condition inputs

* fix(graphql-model-transformer): implemented support for nested non model fields

* fix(graphql-model-transformer): fixed input type field generation for enum types

* fix(graphql-model-transformer): implemented support for nested non model fields

* fix(graphql-model-transformer): fixed input type field generation for enum types

* fix(graphql-model-transformer): implemented support for nested non model fields

* fix(graphql-model-transformer): fixed input type field generation for enum types

* fix(graphql-model-transformer): implemented support for nested non model fields

* fix(graphql-model-transformer): implemented support for nested non model fields

* fix(graphql-model-transformer): fixed input type field generation for enum types

* fix(graphql-model-transformer): implemented support for nested non model fields

* fix(graphql-model-transformer): fixed input type field generation for enum types

* fix(graphql-model-transformer): implemented support for nested non model fields

* fix(graphql-model-transformer): fixed input type field generation for enum types

* chore(graphql-model-transformer): added validateModelSchema to unit test

* chore(graphql-model-transformer): added validateModelSchema to unit test

* fix(graphql-model-transformer): implemented support for nested non model fields

* fix(graphql-model-transformer): fixed input type field generation for enum types

* fix(graphql-model-transformer): implemented support for nested non model fields

* fix(graphql-model-transformer): fixed input type field generation for enum types

* fix(graphql-model-transformer): implemented support for nested non model fields

* fix(graphql-model-transformer): fixed input type field generation for enum types

* fix(graphql-model-transformer): implemented support for nested non model fields

* fix(graphql-model-transformer): fixed input type field generation for enum types

* chore(graphql-model-transformer): added validateModelSchema to unit test

* chore(graphql-model-transformer): fixed merge conflicts

* fix(graphql-model-transformer): fixed input type field generation for enum types

* fix(graphql-model-transformer): implemented support for nested non model fields

* fix(graphql-model-transformer): fixed input type field generation for enum types

* fix(graphql-model-transformer): implemented support for nested non model fields

* fix(graphql-model-transformer): fixed input type field generation for enum types

* fix(graphql-model-transformer): implemented support for nested non model fields

* fix(graphql-model-transformer): fixed input type field generation for enum types

* chore(graphql-model-transformer): added validateModelSchema to unit test

* fix(graphql-model-transformer): fixed @model transformer advanced subscriptions

* fix(graphql-model-transformer): fixed @model model sort direction

* fix(graphql-model-transformer): fixed @model model sort direction

* fix(graphql-model-transformer): changes to @model v2 transformer to support condition inputs

* chore(graphql-model-transformer): fixed merge conflicts
  • Loading branch information
lazpavel authored Aug 25, 2021
1 parent fe5c1ec commit fc93dba
Show file tree
Hide file tree
Showing 6 changed files with 1,871 additions and 103 deletions.
5 changes: 3 additions & 2 deletions packages/amplify-graphql-index-transformer/src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ function generateFilterInputs(config: IndexDirectiveConfiguration, ctx: Transfor
}

function makeModelXFilterInputObject(config: IndexDirectiveConfiguration, ctx: TransformerContextProvider): InputObjectTypeDefinitionNode {
const supportsConditions = true;
const { object } = config;
const name = ModelResourceIDs.ModelFilterInputTypeName(object.name.value);
const fields = object
Expand All @@ -393,8 +394,8 @@ function makeModelXFilterInputObject(config: IndexDirectiveConfiguration, ctx: T

if (isScalar(field.type) || isList) {
filterTypeName = isList
? ModelResourceIDs.ModelFilterListInputTypeName(baseType, true)
: ModelResourceIDs.ModelScalarFilterInputTypeName(baseType, true);
? ModelResourceIDs.ModelFilterListInputTypeName(baseType, !supportsConditions)
: ModelResourceIDs.ModelScalarFilterInputTypeName(baseType, !supportsConditions);
}

return {
Expand Down
Loading

0 comments on commit fc93dba

Please sign in to comment.