Skip to content

Commit

Permalink
Merge pull request #785 from aws-amplify/main
Browse files Browse the repository at this point in the history
Release Codegen Plugin
  • Loading branch information
phani-srikar authored Jan 29, 2024
2 parents ca98131 + dbfc8c1 commit ca26897
Show file tree
Hide file tree
Showing 14 changed files with 617 additions and 639 deletions.
249 changes: 35 additions & 214 deletions dependency_licenses.txt

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@
"js-yaml": "^4.0.0",
"lnk": "1.1.0",
"prettier": "^1.19.1",
"prettier-eslint": "^9.0.1",
"pretty-quick": "^3.1.0",
"rimraf": "^3.0.0",
"ts-jest": "^27.0.0",
Expand Down
34 changes: 34 additions & 0 deletions packages/appsync-modelgen-plugin/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ export interface AppSyncModelPluginConfig extends RawDocumentsConfig {
directives?: string;
}

// @public (undocumented)
export type Argument = {
name: string;
type: FieldType;
isArray: boolean;
isRequired: boolean;
isArrayNullable?: boolean;
};

// @public (undocumented)
export type Arguments = Record<string, Argument>;

// @public (undocumented)
export type AssociationBaseType = {
connectionType: CodeGenConnectionType;
Expand Down Expand Up @@ -72,6 +84,7 @@ export type Field = {
isArrayNullable?: boolean;
attributes?: FieldAttribute[];
association?: AssociationType;
arguments?: Arguments;
};

// @public (undocumented)
Expand Down Expand Up @@ -103,6 +116,9 @@ export type ModelIntrospectionSchema = {
models: SchemaModels;
nonModels: SchemaNonModels;
enums: SchemaEnums;
queries?: SchemaQueries;
mutations?: SchemaMutations;
subscriptions?: SchemaSubscriptions;
};

// Warning: (ae-forgotten-export) The symbol "RawAppSyncModelConfig" needs to be exported by the entry point index.d.ts
Expand Down Expand Up @@ -142,6 +158,12 @@ export type SchemaModel = {
// @public (undocumented)
export type SchemaModels = Record<string, SchemaModel>;

// @public (undocumented)
export type SchemaMutation = SchemaQuery;

// @public (undocumented)
export type SchemaMutations = Record<string, SchemaMutation>;

// @public (undocumented)
export type SchemaNonModel = {
name: string;
Expand All @@ -151,6 +173,18 @@ export type SchemaNonModel = {
// @public (undocumented)
export type SchemaNonModels = Record<string, SchemaNonModel>;

// @public (undocumented)
export type SchemaQueries = Record<string, SchemaQuery>;

// @public (undocumented)
export type SchemaQuery = Pick<Field, 'name' | 'type' | 'isArray' | 'isRequired' | 'isArrayNullable' | 'arguments'>;

// @public (undocumented)
export type SchemaSubscription = SchemaQuery;

// @public (undocumented)
export type SchemaSubscriptions = Record<string, SchemaSubscription>;

// @public (undocumented)
export type Target = 'java' | 'swift' | 'javascript' | 'typescript' | 'dart' | 'introspection';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@
},
"enums": {
"$ref": "#/definitions/SchemaEnums"
},
"queries": {
"$ref": "#/definitions/SchemaQueries"
},
"mutations": {
"$ref": "#/definitions/SchemaMutations"
},
"subscriptions": {
"$ref": "#/definitions/SchemaSubscriptions"
}
},
"required": [
Expand Down Expand Up @@ -122,6 +131,9 @@
},
"association": {
"$ref": "#/definitions/AssociationType"
},
"arguments": {
"$ref": "#/definitions/Arguments"
}
},
"required": [
Expand Down Expand Up @@ -317,6 +329,42 @@
"targetNames"
]
},
"Arguments": {
"$ref": "#/definitions/Record%3Cstring%2CArgument%3E"
},
"Record<string,Argument>": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/Argument"
}
},
"Argument": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"type": {
"$ref": "#/definitions/FieldType"
},
"isArray": {
"type": "boolean"
},
"isRequired": {
"type": "boolean"
},
"isArrayNullable": {
"type": "boolean"
}
},
"required": [
"name",
"type",
"isArray",
"isRequired"
],
"additionalProperties": false
},
"PrimaryKeyInfo": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -392,6 +440,72 @@
"values"
],
"additionalProperties": false
},
"SchemaQueries": {
"$ref": "#/definitions/Record%3Cstring%2CSchemaQuery%3E"
},
"Record<string,SchemaQuery>": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/SchemaQuery"
}
},
"SchemaQuery": {
"$ref": "#/definitions/Pick%3CField%2C(%22name%22%7C%22type%22%7C%22isArray%22%7C%22isRequired%22%7C%22isArrayNullable%22%7C%22arguments%22)%3E"
},
"Pick<Field,(\"name\"|\"type\"|\"isArray\"|\"isRequired\"|\"isArrayNullable\"|\"arguments\")>": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"type": {
"$ref": "#/definitions/FieldType"
},
"isArray": {
"type": "boolean"
},
"isRequired": {
"type": "boolean"
},
"isArrayNullable": {
"type": "boolean"
},
"arguments": {
"$ref": "#/definitions/Arguments"
}
},
"required": [
"name",
"type",
"isArray",
"isRequired"
],
"additionalProperties": false
},
"SchemaMutations": {
"$ref": "#/definitions/Record%3Cstring%2CSchemaMutation%3E"
},
"Record<string,SchemaMutation>": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/SchemaMutation"
}
},
"SchemaMutation": {
"$ref": "#/definitions/SchemaQuery"
},
"SchemaSubscriptions": {
"$ref": "#/definitions/Record%3Cstring%2CSchemaSubscription%3E"
},
"Record<string,SchemaSubscription>": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/SchemaSubscription"
}
},
"SchemaSubscription": {
"$ref": "#/definitions/SchemaQuery"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ describe('processIndex', () => {
arguments: {
name: 'testModelsByConnectionFieldAndSortField',
fields: ['connectionField', 'sortField'],
queryField: undefined,
queryField: undefined,
},
},
{
Expand Down
Loading

0 comments on commit ca26897

Please sign in to comment.