diff --git a/package.json b/package.json index c5171a6d..49a5fb13 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "test": "cd packages/openapi-to-graphql/ && npm test" }, "devDependencies": { - "@types/jest": "^24.0.15", + "@types/jest": "^24.0.16", "graphql": "^14.0.2", "jest": "^24.8.0", "lerna": "^3.4.3", diff --git a/packages/openapi-to-graphql-cli/lib/openapi-to-graphql.js b/packages/openapi-to-graphql-cli/lib/openapi-to-graphql.js old mode 100644 new mode 100755 diff --git a/packages/openapi-to-graphql/README.md b/packages/openapi-to-graphql/README.md index 4d079b7b..f6ced44c 100644 --- a/packages/openapi-to-graphql/README.md +++ b/packages/openapi-to-graphql/README.md @@ -154,6 +154,8 @@ Schema options: - `addLimitArgument` (type: `boolean`, default: `false`): Add a `limit` argument to fields returning lists of objects/lists that will limit the number of returned elements, selecting the first `n` elements of the list. +- `idFormats` (type: `string[]`): If a schema is of type string and has format UUID, it will be translated into a [GraphQL ID type](https://graphql.org/graphql-js/type/#graphqlid). To allow for more customzation, this option allows users to specify other formats that should be interpreted as ID types. + *** Resolver options: diff --git a/packages/openapi-to-graphql/lib/index.js b/packages/openapi-to-graphql/lib/index.js index 5da12b31..6e25f08a 100644 --- a/packages/openapi-to-graphql/lib/index.js +++ b/packages/openapi-to-graphql/lib/index.js @@ -99,7 +99,7 @@ exports.createGraphQlSchema = createGraphQlSchema; */ function translateOpenApiToGraphQL(oass, { strict, report, // Schema options -operationIdFieldNames, fillEmptyResponses, addLimitArgument, +operationIdFieldNames, fillEmptyResponses, addLimitArgument, idFormats, // Resolver options headers, qs, requestOptions, baseUrl, customResolvers, // Authentication options @@ -114,6 +114,7 @@ provideErrorExtensions, equivalentToMessages }) { operationIdFieldNames, fillEmptyResponses, addLimitArgument, + idFormats, // Resolver options headers, qs, diff --git a/packages/openapi-to-graphql/lib/index.js.map b/packages/openapi-to-graphql/lib/index.js.map index fc38b853..852fd619 100644 --- a/packages/openapi-to-graphql/lib/index.js.map +++ b/packages/openapi-to-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-graphql/lib/oas_3_tools.d.ts b/packages/openapi-to-graphql/lib/oas_3_tools.d.ts index c3609d0b..e5e8301b 100644 --- a/packages/openapi-to-graphql/lib/oas_3_tools.d.ts +++ b/packages/openapi-to-graphql/lib/oas_3_tools.d.ts @@ -86,7 +86,7 @@ export declare function instantiatePathAndGetQuery(path: string, parameters: Par * Returns the "type" of the given JSON schema. Makes best guesses if the type * is not explicitly defined. */ -export declare function getSchemaType(schema: SchemaObject): string | null; +export declare function getSchemaType(schema: SchemaObject, data: PreprocessingData): string | null; /** * Determines an approximate name for the resource at the given path. */ diff --git a/packages/openapi-to-graphql/lib/oas_3_tools.js b/packages/openapi-to-graphql/lib/oas_3_tools.js index 42b856cd..7ad8fee6 100644 --- a/packages/openapi-to-graphql/lib/oas_3_tools.js +++ b/packages/openapi-to-graphql/lib/oas_3_tools.js @@ -304,13 +304,13 @@ exports.instantiatePathAndGetQuery = instantiatePathAndGetQuery; * Returns the "type" of the given JSON schema. Makes best guesses if the type * is not explicitly defined. */ -function getSchemaType(schema) { +function getSchemaType(schema, data) { // CASE: enum if (Array.isArray(schema.enum)) { return 'enum'; } // CASE: object - if (schema.type === 'object') { + if (schema.type === 'object' || 'properties' in schema) { // CASE: arbitrary JSON if (typeof schema.additionalProperties === 'object') { return 'json'; @@ -319,19 +319,30 @@ function getSchemaType(schema) { return 'object'; } } - if ('properties' in schema) { - return 'object'; - } // CASE: array - if ('items' in schema) { + if (schema.type === 'array' || 'items' in schema) { return 'array'; } - // CASE: 64 bit int - return number, leading to use of GraphQLFloat: - if (schema.type === 'integer' && schema.format === 'int64') { - return 'number'; - } // CASE: a type is present if (typeof schema.type === 'string') { + // Special edge cases involving the schema format + if (typeof schema.format === 'string') { + /** + * CASE: 64 bit int - return number instead of integer, leading to use of + * GraphQLFloat, which can support 64 bits: + */ + if (schema.type === 'integer' && schema.format === 'int64') { + return 'number'; + // CASE: id + } + else if (schema.type === 'string' && + (schema.format === 'uuid' || + // Custom ID format + (Array.isArray(data.options.idFormats) && + data.options.idFormats.includes(schema.format)))) { + return 'id'; + } + } return schema.type; } // CASE: nullable - default to string diff --git a/packages/openapi-to-graphql/lib/oas_3_tools.js.map b/packages/openapi-to-graphql/lib/oas_3_tools.js.map index d2c7e8af..12634051 100644 --- a/packages/openapi-to-graphql/lib/oas_3_tools.js.map +++ b/packages/openapi-to-graphql/lib/oas_3_tools.js.map @@ -1 +1 @@ -{"version":3,"file":"oas_3_tools.js","sourceRoot":"","sources":["../src/oas_3_tools.ts"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,kCAAkC;AAClC,+CAA+C;AAC/C,gEAAgE;;;;;;;;;;AAgChE,WAAW;AACX,mDAAkD;AAClD,8CAA6C;AAC7C,iCAAyB;AACzB,mCAAuC;AA8BvC,MAAM,OAAO,GAAG,eAAK,CAAC,MAAM,CAAC,CAAA;AAC7B,MAAM,gBAAgB,GAAG,eAAK,CAAC,eAAe,CAAC,CAAA;AAE/C,MAAM,cAAc,GAAG,eAAK,CAAC,aAAa,CAAC,CAAA;AAE3C,gBAAgB;AACH,QAAA,cAAc,GAAG;IAC5B,KAAK;IACL,KAAK;IACL,MAAM;IACN,OAAO;IACP,QAAQ;IACR,SAAS;IACT,MAAM;CACP,CAAA;AACY,QAAA,iBAAiB,GAAG,eAAe,CAAA;AAEhD;;;GAGG;AACH,SAAsB,YAAY,CAAC,IAAiB;;QAClD,kBAAkB;QAClB,IACE,OAAQ,IAAa,CAAC,OAAO,KAAK,QAAQ;YACzC,IAAa,CAAC,OAAO,KAAK,KAAK,EAChC;YACA,gBAAgB,CACd,4DAA4D,CAC7D,CAAA;YACD,MAAM,MAAM,GAAsB,MAAM,eAAe,CAAC,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;YAC5E,OAAO,MAAM,CAAC,OAAe,CAAA;YAE7B,iBAAiB;SAClB;aAAM,IACL,OAAQ,IAAa,CAAC,OAAO,KAAK,QAAQ;YAC1C,IAAI,CAAC,IAAI,CAAE,IAAa,CAAC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EAAE,CAAC,CAAA;AACtD,CAAC;AAFD,kCAEC;AAED;;;;;GAKG;AACH,SAAgB,qBAAqB,CACnC,MAAc,EACd,IAAY,EACZ,KAAc;IAEd,IAAI,KAAK,EAAE;QACT,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,WAAW,EAAE,IAAI,IAAI,EAAE,CAAA;KAClD;SAAM;QACL,OAAO,GAAG,MAAM,CAAC,WAAW,EAAE,IAAI,IAAI,EAAE,CAAA;KACzC;AACH,CAAC;AAVD,sDAUC;AAED;;GAEG;AACH,SAAgB,UAAU,CAAC,GAAW;IACpC,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AACnD,CAAC;AAFD,gCAEC;AAED;;GAEG;AACH,SAAgB,YAAY,CAAC,GAAW;IACtC,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AACnD,CAAC;AAFD,oCAEC;AAED;;GAEG;AACH,SAAgB,mBAAmB,CAAC,MAAc,EAAE,IAAY;IAC9D,OAAO,QAAQ,CAAC,GAAG,MAAM,IAAI,IAAI,EAAE,CAAC,CAAA;AACtC,CAAC;AAFD,kDAEC"} \ No newline at end of file diff --git a/packages/openapi-to-graphql/lib/preprocessor.js b/packages/openapi-to-graphql/lib/preprocessor.js index b49bf8f5..96c3714e 100644 --- a/packages/openapi-to-graphql/lib/preprocessor.js +++ b/packages/openapi-to-graphql/lib/preprocessor.js @@ -374,7 +374,7 @@ function createDataDef(names, schema, isInputObjectType, data, links, oas) { const saneName = Oas3Tools.capitalize(Oas3Tools.sanitizeAndStore(name, data.saneMap)); const saneInputName = Oas3Tools.capitalize(saneName + 'Input'); // Determine the type of the schema - const type = Oas3Tools.getSchemaType(schema); + const type = Oas3Tools.getSchemaType(schema, data); if (!type) { throw new Error(`Cannot process schema '${JSON.stringify(schema)}'. Cannot identify type of schema.`); } diff --git a/packages/openapi-to-graphql/lib/preprocessor.js.map b/packages/openapi-to-graphql/lib/preprocessor.js.map index acc3d571..e1620764 100644 --- a/packages/openapi-to-graphql/lib/preprocessor.js.map +++ b/packages/openapi-to-graphql/lib/preprocessor.js.map @@ -1 +1 @@ -{"version":3,"file":"preprocessor.js","sourceRoot":"","sources":["../src/preprocessor.ts"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,kCAAkC;AAClC,+CAA+C;AAC/C,gEAAgE;;AAWhE,WAAW;AACX,2CAA0C;AAC1C,wCAAuC;AACvC,iCAAyB;AACzB,mCAA+D;AAC/D,sDAAqD;AAErD,MAAM,gBAAgB,GAAG,eAAK,CAAC,eAAe,CAAC,CAAA;AAE/C;;;GAGG;AACH,SAAgB,aAAa,CAC3B,IAAY,EACZ,OAAwB;IAExB,MAAM,IAAI,GAAsB;QAC9B,WAAW,EAAE;YACX,OAAO;YACP,UAAU,CAAC,oDAAoD;SAChE;QACD,IAAI,EAAE,EAAE;QACR,UAAU,EAAE,EAAE;QACd,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,EAAE;QACZ,OAAO;QACP,IAAI;KACL,CAAA;IAED,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;QACjB,sBAAsB;QACtB,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,IAAI,SAAS,CAAC,eAAe,CAAC,GAAG,CAAC,CAAA;QAC5D,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,IAAI,SAAS,CAAC,uBAAuB,CAAC,GAAG,CAAC,CAAA;QAC5E,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,IAAI,SAAS,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAA;QAEtE,uBAAuB;QACvB,MAAM,eAAe,GAAG,2BAA2B,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;QAC9D,MAAM,0BAA0B,GAAG,8BAA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newline at end of file +{"version":3,"file":"preprocessor.js","sourceRoot":"","sources":["../src/preprocessor.ts"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,kCAAkC;AAClC,+CAA+C;AAC/C,gEAAgE;;AAWhE,WAAW;AACX,2CAA0C;AAC1C,wCAAuC;AACvC,iCAAyB;AACzB,mCAA+D;AAC/D,sDAAqD;AAErD,MAAM,gBAAgB,GAAG,eAAK,CAAC,eAAe,CAAC,CAAA;AAE/C;;;GAGG;AACH,SAAgB,aAAa,CAC3B,IAAY,EACZ,OAAwB;IAExB,MAAM,IAAI,GAAsB;QAC9B,WAAW,EAAE;YACX,OAAO;YACP,UAAU,CAAC,oDAAoD;SAChE;QACD,IAAI,EAAE,EAAE;QACR,UAAU,EAAE,EAAE;QACd,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,EAAE;QACZ,OAAO;QACP,IAAI;KACL,CAAA;IAED,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;QACjB,sBAAsB;QACtB,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,IAAI,SAAS,CAAC,eAAe,CAAC,GAAG,CAAC,CAAA;QAC5D,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,IAAI,SAAS,CAAC,uBAAuB,CAAC,GAAG,CAAC,CAAA;QAC5E,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,IAAI,SAAS,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAA;QAEtE,uBAAuB;QACvB,MAAM,eAAe,GAAG,2BAA2B,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;QAC9D,MAAM,0BAA0B,GAAG,8BAAsB,CACvD,IAAI,CAAC,QAAQ,EACb,eAAe,CAChB,CAAA;QACD,0BAA0B,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;YAChD,qBAAa,CAAC;gBACZ,OAAO,EAAE,2BAA2B;gBACpC,OAAO,EAAE,4DAA4D,YAAY,GAAG;gBACpF,kBAAkB,EACh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,CAAC,UAAU,CAAA;SAC9B;KACF;IAED,uBAAuB;IACvB,IAAI,CAAC,UAAU,IAAI,OAAO,KAAK,CAAC,QAAQ,KAAK,QAAQ,EAAE;QACrD,MAAM,QAAQ,GAAG,SAAS,CAAC,UAAU,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;QACzE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;YACjC,UAAU,GAAG,KAAK,CAAC,QAAQ,CAAA;SAC5B;KACF;IAED,6DAA6D;IAC7D,IAAI,CAAC,UAAU,EAAE;QACf,MAAM,QAAQ,GAAG,SAAS,CAAC,UAAU,CACnC,SAAS,CAAC,QAAQ,CAChB,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ;YAC/B,CAAC,CAAC,KAAK,CAAC,OAAO;YACf,CAAC,CAAC,OAAO,KAAK,CAAC,UAAU,KAAK,QAAQ;gBACtC,CAAC,CAAC,KAAK,CAAC,UAAU;gBAClB,CAAC,CAAC,OAAO,KAAK,CAAC,QAAQ,KAAK,QAAQ;oBACpC,CAAC,CAAC,KAAK,CAAC,QAAQ;oBAChB,CAAC,CAAC,YAAY,CACjB,CACF,CAAA;QACD,IAAI,QAAQ,GAAG,CAAC,CAAA;QAEhB;;;;WAIG;QACH,OAAO,SAAS,CAAC,QAAQ,CAAC,GAAG,QAAQ,GAAG,QAAQ,EAAE,CAAC,EAAE;YACnD,QAAQ,EAAE,CAAA;SACX;QACD,UAAU,GAAG,GAAG,QAAQ,GAAG,QAAQ,EAAE,CAAA;KACtC;IAED,OAAO,UAAU,CAAA;AACnB,CAAC"} \ No newline at end of file diff --git a/packages/openapi-to-graphql/lib/schema_builder.js b/packages/openapi-to-graphql/lib/schema_builder.js index c1305ac4..35933026 100644 --- a/packages/openapi-to-graphql/lib/schema_builder.js +++ b/packages/openapi-to-graphql/lib/schema_builder.js @@ -243,6 +243,9 @@ function reuseOrCreateEnum({ def, data }) { function getScalarType({ def, data }) { const type = def.type; switch (type) { + case 'id': + def.ot = graphql_1.GraphQLID; + break; case 'string': def.ot = graphql_1.GraphQLString; break; diff --git a/packages/openapi-to-graphql/lib/schema_builder.js.map b/packages/openapi-to-graphql/lib/schema_builder.js.map index f2e7aaf5..5d44afe7 100644 --- a/packages/openapi-to-graphql/lib/schema_builder.js.map +++ b/packages/openapi-to-graphql/lib/schema_builder.js.map @@ -1 +1 @@ -{"version":3,"file":"schema_builder.js","sourceRoot":"","sources":["../src/schema_builder.ts"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,kCAAkC;AAClC,+CAA+C;AAC/C,gEAAgE;;AAkBhE,qCAagB;AAEhB,WAAW;AACX,iDAAgD;AAChD,2CAA0C;AAC1C,yDAAgD;AAChD,iDAA8C;AAC9C,iCAAyB;AACzB,mCAAmD;AA4DnD,MAAM,cAAc,GAAG,eAAK,CAAC,aAAa,CAAC,CAAA;AAE3C;;GAEG;AACH,SAAgB,cAAc,CAAC,EAC7B,GAAG,EACH,SAAS,EACT,IAAI,EACJ,SAAS,GAAG,CAAC,EACb,UAAU,GAAG,KAAK,EACG;IACrB,MAAM,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAA;IAElD,6BAA6B;IAC7B,IAAI,SAAS,KAAK,EAAE,EAAE;QACpB,MAAM,IAAI,KAAK,CAAC,4CAA4C,IAAI,EAAE,CAAC,CAAA;KACpE;IAED,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;IAErB,mCAAmC;IACnC,IAAI,IAAI,KAAK,QAAQ,EAAE;QACrB,OAAO,eAAe,CAAC;YACrB,GAAG;YACH,SAAS;YACT,IAAI;YACJ,SAAS;YACT,UAAU;SACX,CAAC,CAAA;QAEF,iCAAiC;KAClC;SAAM,IAAI,IAAI,KAAK,OAAO,EAAE;QAC3B,OAAO,iBAAiB,CAAC;YACvB,GAAG;YACH,S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eAAe;QACf,UAAU;QAEV,iCAAiC;QACjC,gCAAgC;QAChC;YACE,qBAAa,CAAC;gBACZ,OAAO,EAAE,mBAAmB;gBAC5B,OAAO,EACL,wCAAwC;oBACxC,IAAI,IAAI,CAAC,YAAY,gCAAgC;oBACrD,kDAAkD;gBACpD,IAAI;gBACJ,GAAG,EAAE,cAAc;aACpB,CAAC,CAAA;KACL;AACH,CAAC"} \ No newline at end of file +{"version":3,"file":"schema_builder.js","sourceRoot":"","sources":["../src/schema_builder.ts"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,kCAAkC;AAClC,+CAA+C;AAC/C,gEAAgE;;AAkBhE,qCAcgB;AAEhB,WAAW;AACX,iDAAgD;AAChD,2CAA0C;AAC1C,yDAAgD;AAChD,iDAA8C;AAC9C,iCAAyB;AACzB,mCAAmD;AA4DnD,MAAM,cAAc,GAAG,eAAK,CAAC,aAAa,CAAC,CAAA;AAE3C;;GAEG;AACH,SAAgB,cAAc,CAAC,EAC7B,GAAG,EACH,SAAS,EACT,IAAI,EACJ,SAAS,GAAG,CAAC,EACb,UAAU,GAAG,KAAK,EACG;IACrB,MAAM,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAA;IAElD,6BAA6B;IAC7B,IAAI,SAAS,KAAK,EAAE,EAAE;QACpB,MAAM,IAAI,KAAK,CAAC,4CAA4C,IAAI,EAAE,CAAC,CAAA;KACpE;IAED,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;IAErB,mCAAmC;IACnC,IAAI,IAAI,KAAK,QAAQ,EAAE;QACrB,OAAO,eAAe,CAAC;YACrB,GAAG;YACH,SAAS;YACT,IAAI;YACJ,SAAS;YACT,UAAU;SACX,CAAC,CAAA;QAEF,iCAAiC;KAClC;SAAM,IAAI,IAAI,KAAK,OAAO,EAAE;QAC3B,OAAO,iBAAiB,CAAC;YACvB,GAAG;YACH,SAAS;YACT,IAA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,MAAK;QAEP,UAAU;QACV,cAAc;QACd,UAAU;QAEV,UAAU;QACV,eAAe;QACf,UAAU;QAEV,iCAAiC;QACjC,gCAAgC;QAChC;YACE,qBAAa,CAAC;gBACZ,OAAO,EAAE,mBAAmB;gBAC5B,OAAO,EACL,wCAAwC;oBACxC,IAAI,IAAI,CAAC,YAAY,gCAAgC;oBACrD,kDAAkD;gBACpD,IAAI;gBACJ,GAAG,EAAE,cAAc;aACpB,CAAC,CAAA;KACL;AACH,CAAC"} \ No newline at end of file diff --git a/packages/openapi-to-graphql/lib/types/options.d.ts b/packages/openapi-to-graphql/lib/types/options.d.ts index 10192fa1..0d4cef85 100644 --- a/packages/openapi-to-graphql/lib/types/options.d.ts +++ b/packages/openapi-to-graphql/lib/types/options.d.ts @@ -52,6 +52,12 @@ export declare type Options = { * Returns the first n number of elements in the list */ addLimitArgument?: boolean; + /** + * If a schema is of type string and has format UUID, it will be translated + * into a GraphQL ID type. To allow for more customzation, this option allows + * users to specify other formats that should be interpreted as ID types. + */ + idFormats?: string[]; /** * Custom headers to send with every request made by a resolve function. */ @@ -172,6 +178,12 @@ export declare type InternalOptions = { * Returns the first n number of elements in the list */ addLimitArgument: boolean; + /** + * If a schema is of type string and has format UUID, it will be translated + * into a GraphQL ID type. To allow for more customzation, this option allows + * users to specify other formats that should be interpreted as ID types. + */ + idFormats?: string[]; /** * Custom headers to send with every request made by a resolve function. */ diff --git a/packages/openapi-to-graphql/src/index.ts b/packages/openapi-to-graphql/src/index.ts index 71331186..2ec72d12 100644 --- a/packages/openapi-to-graphql/src/index.ts +++ b/packages/openapi-to-graphql/src/index.ts @@ -155,6 +155,7 @@ async function translateOpenApiToGraphQL( operationIdFieldNames, fillEmptyResponses, addLimitArgument, + idFormats, // Resolver options headers, @@ -181,6 +182,7 @@ async function translateOpenApiToGraphQL( operationIdFieldNames, fillEmptyResponses, addLimitArgument, + idFormats, // Resolver options headers, diff --git a/packages/openapi-to-graphql/src/oas_3_tools.ts b/packages/openapi-to-graphql/src/oas_3_tools.ts index dc9b52f9..69b30c05 100644 --- a/packages/openapi-to-graphql/src/oas_3_tools.ts +++ b/packages/openapi-to-graphql/src/oas_3_tools.ts @@ -38,7 +38,6 @@ import * as Swagger2OpenAPI from 'swagger2openapi' import * as OASValidator from 'oas-validator' import debug from 'debug' import { handleWarning } from './utils' -import { parseType } from 'graphql' // Type definitions & exports: export type SchemaNames = { @@ -400,14 +399,17 @@ export function instantiatePathAndGetQuery( * Returns the "type" of the given JSON schema. Makes best guesses if the type * is not explicitly defined. */ -export function getSchemaType(schema: SchemaObject): string | null { +export function getSchemaType( + schema: SchemaObject, + data: PreprocessingData +): string | null { // CASE: enum if (Array.isArray(schema.enum)) { return 'enum' } // CASE: object - if (schema.type === 'object') { + if (schema.type === 'object' || 'properties' in schema) { // CASE: arbitrary JSON if (typeof schema.additionalProperties === 'object') { return 'json' @@ -416,22 +418,34 @@ export function getSchemaType(schema: SchemaObject): string | null { } } - if ('properties' in schema) { - return 'object' - } - // CASE: array - if ('items' in schema) { + if (schema.type === 'array' || 'items' in schema) { return 'array' } - // CASE: 64 bit int - return number, leading to use of GraphQLFloat: - if (schema.type === 'integer' && schema.format === 'int64') { - return 'number' - } - // CASE: a type is present if (typeof schema.type === 'string') { + // Special edge cases involving the schema format + if (typeof schema.format === 'string') { + /** + * CASE: 64 bit int - return number instead of integer, leading to use of + * GraphQLFloat, which can support 64 bits: + */ + if (schema.type === 'integer' && schema.format === 'int64') { + return 'number' + + // CASE: id + } else if ( + schema.type === 'string' && + (schema.format === 'uuid' || + // Custom ID format + (Array.isArray(data.options.idFormats) && + data.options.idFormats.includes(schema.format))) + ) { + return 'id' + } + } + return schema.type } diff --git a/packages/openapi-to-graphql/src/preprocessor.ts b/packages/openapi-to-graphql/src/preprocessor.ts index 88a975cb..730c2df4 100644 --- a/packages/openapi-to-graphql/src/preprocessor.ts +++ b/packages/openapi-to-graphql/src/preprocessor.ts @@ -503,7 +503,7 @@ export function createDataDef( const saneInputName = Oas3Tools.capitalize(saneName + 'Input') // Determine the type of the schema - const type = Oas3Tools.getSchemaType(schema as SchemaObject) + const type = Oas3Tools.getSchemaType(schema as SchemaObject, data) if (!type) { throw new Error( `Cannot process schema '${JSON.stringify( diff --git a/packages/openapi-to-graphql/src/schema_builder.ts b/packages/openapi-to-graphql/src/schema_builder.ts index db2fc805..350363e9 100644 --- a/packages/openapi-to-graphql/src/schema_builder.ts +++ b/packages/openapi-to-graphql/src/schema_builder.ts @@ -23,6 +23,7 @@ import { GraphQLScalarType, GraphQLObjectType, GraphQLString, + GraphQLID, GraphQLInt, GraphQLFloat, GraphQLBoolean, @@ -378,6 +379,9 @@ function getScalarType({ def, data }: ReuseOrCreateScalar): GraphQLScalarType { const type = def.type switch (type) { + case 'id': + def.ot = GraphQLID + break case 'string': def.ot = GraphQLString break diff --git a/packages/openapi-to-graphql/src/types/options.ts b/packages/openapi-to-graphql/src/types/options.ts index 9615914d..21ee6d36 100644 --- a/packages/openapi-to-graphql/src/types/options.ts +++ b/packages/openapi-to-graphql/src/types/options.ts @@ -67,6 +67,13 @@ export type Options = { */ addLimitArgument?: boolean + /** + * If a schema is of type string and has format UUID, it will be translated + * into a GraphQL ID type. To allow for more customzation, this option allows + * users to specify other formats that should be interpreted as ID types. + */ + idFormats?: string[] + // Resolver options /** @@ -202,6 +209,13 @@ export type InternalOptions = { */ addLimitArgument: boolean + /** + * If a schema is of type string and has format UUID, it will be translated + * into a GraphQL ID type. To allow for more customzation, this option allows + * users to specify other formats that should be interpreted as ID types. + */ + idFormats?: string[] + // Resolver options /** diff --git a/packages/openapi-to-graphql/test/docusign.test.ts b/packages/openapi-to-graphql/test/docusign.test.ts index 7c3db984..39f68d19 100644 --- a/packages/openapi-to-graphql/test/docusign.test.ts +++ b/packages/openapi-to-graphql/test/docusign.test.ts @@ -8,11 +8,12 @@ /* globals test, expect */ import * as openapiToGraphql from '../lib/index.js' +import { Options } from '../lib/types/options.js' const oas = require('./fixtures/docusign_oas.json') test('Generate schema without problems', () => { - const options = { + const options: Options = { strict: false } return openapiToGraphql diff --git a/packages/openapi-to-graphql/test/example_api.test.ts b/packages/openapi-to-graphql/test/example_api.test.ts index a29f6ddf..fb478c56 100644 --- a/packages/openapi-to-graphql/test/example_api.test.ts +++ b/packages/openapi-to-graphql/test/example_api.test.ts @@ -8,6 +8,7 @@ /* globals beforeAll, test, expect */ import * as openapiToGraphql from '../lib/index.js' +import { Options } from '../lib/types/options.js' const { graphql, parse, validate } = require('graphql') const { startServer, stopServer } = require('./example_api_server') @@ -811,24 +812,24 @@ test('Fields with arbitrary JSON (e.g., maps) can be returned', () => { return graphql(createdSchema, query, null, {}).then(result => { expect(result).toEqual({ data: { - "cars": [ + cars: [ { - "tags": null + tags: null }, { - "tags": { - "speed": "extreme" + tags: { + speed: 'extreme' } }, { - "tags": { - "impression": "decadent", - "condition": "slightly beat-up" + tags: { + impression: 'decadent', + condition: 'slightly beat-up' } }, { - "tags": { - "impression": "decadent" + tags: { + impression: 'decadent' } } ] @@ -855,7 +856,7 @@ test('Capitalized enum values can be returned', () => { }) test('Define header and query options', () => { - const options = { + const options: Options = { headers: { exampleHeader: 'some-value' }, @@ -936,7 +937,7 @@ test('Error contains extension', () => { }) test('Option provideErrorExtensions should prevent error extensions from being created', () => { - const options = { + const options: Options = { provideErrorExtensions: false } const query = `query { @@ -973,7 +974,7 @@ test('Option provideErrorExtensions should prevent error extensions from being c }) test('Option customResolver', () => { - const options = { + const options: Options = { customResolvers: { 'Example API': { '/users/{username}': { @@ -1010,7 +1011,7 @@ test('Option customResolver', () => { }) test('Option customResolver with links', () => { - const options = { + const options: Options = { customResolvers: { 'Example API': { '/users/{username}': { @@ -1064,13 +1065,13 @@ test('Option customResolver with links', () => { }) test('Option customResolver using resolver arguments', () => { - const options = { + const options: Options = { customResolvers: { 'Example API': { '/users/{username}': { get: (obj, args, context, info) => { return { - name: args.username + name: args['username'] } } } @@ -1101,7 +1102,7 @@ test('Option customResolver using resolver arguments', () => { }) test('Option customResolver using resolver arguments that are sanitized', () => { - const options = { + const options: Options = { customResolvers: { 'Example API': { '/products/{product-id}': { @@ -1140,7 +1141,7 @@ test('Option customResolver using resolver arguments that are sanitized', () => }) test('Option addLimitArgument', () => { - const options = { + const options: Options = { addLimitArgument: true } const query = `query { @@ -1272,48 +1273,48 @@ test('Handle objects without defined properties with arbitrary GraphQL JSON type return graphql(createdSchema, query).then(result => { expect(result).toEqual({ data: { - "trashcan": { - "brand": "Garbage Emporium", - "contents": [ + trashcan: { + brand: 'Garbage Emporium', + contents: [ { - "type": "apple", - "message": "Half-eaten" + type: 'apple', + message: 'Half-eaten' }, { - "type": "sock", - "message": "Lost one" + type: 'sock', + message: 'Lost one' } ] }, - "trashcans": [ + trashcans: [ { - "contents": [ + contents: [ { - "type": "apple", - "message": "Half-eaten" + type: 'apple', + message: 'Half-eaten' }, { - "type": "sock", - "message": "Lost one" + type: 'sock', + message: 'Lost one' } ] }, { - "contents": [ + contents: [ { - "type": "sock", - "message": "Lost one" + type: 'sock', + message: 'Lost one' } ] }, { - "contents": [] + contents: [] }, { - "contents": [ + contents: [ { - "type": "tissue", - "message": "Used" + type: 'tissue', + message: 'Used' } ] } @@ -1324,7 +1325,7 @@ test('Handle objects without defined properties with arbitrary GraphQL JSON type }) test('Generate "Equivalent to..." messages', () => { - const options = { + const options: Options = { // Used to simplify test. Otherwise viewers will polute query/mutation fields. viewer: false } @@ -1417,7 +1418,7 @@ test('Generate "Equivalent to..." messages', () => { }) test('Withhold "Equivalent to..." messages', () => { - const options = { + const options: Options = { // Used to simplify test. Otherwise viewers will polute query/mutation fields. viewer: false, equivalentToMessages: false @@ -1500,3 +1501,70 @@ test('Withhold "Equivalent to..." messages', () => { return Promise.all([promise, promise2]) }) + +test('UUID format becomes GraphQL ID type', () => { + let query = `{ + __type(name: "Company") { + fields { + name + type { + name + kind + } + } + } + }` + return graphql(createdSchema, query).then(result => { + expect( + result.data['__type'].fields.find(field => { + return field.name === 'id' + }) + ).toEqual({ + name: 'id', + type: { + name: 'ID', + kind: 'SCALAR' + } + }) + }) +}) + +test('Option idFormats', () => { + const options: Options = { + idFormats: ['specialIdFormat'] + } + + // Check query/mutation field descriptions + const query = `{ + __type(name: "PatentWithId") { + fields { + name + type { + name + kind + } + } + } + }` + + return openapiToGraphql + .createGraphQlSchema(oas, options) + .then(({ schema }) => { + const ast = parse(query) + const errors = validate(schema, ast) + expect(errors).toEqual([]) + return graphql(schema, query).then(result => { + expect( + result.data['__type'].fields.find(field => { + return field.name === 'patentId' + }) + ).toEqual({ + name: 'patentId', + type: { + name: 'ID', + kind: 'SCALAR' + } + }) + }) + }) +}) diff --git a/packages/openapi-to-graphql/test/example_api3.test.ts b/packages/openapi-to-graphql/test/example_api3.test.ts index 934c61ab..b893a03c 100644 --- a/packages/openapi-to-graphql/test/example_api3.test.ts +++ b/packages/openapi-to-graphql/test/example_api3.test.ts @@ -8,6 +8,7 @@ /* globals beforeAll, test, expect */ import * as openapiToGraphql from '../lib/index.js' +import { Options } from '../lib/types/options.js' const { graphql, parse, validate } = require('graphql') const api = require('./example_api_server') const api2 = require('./example_api3_server') @@ -295,7 +296,7 @@ test('Two APIs with AnyAuth viewer and interrelated links', () => { }) test('Option customResolver with two APIs', () => { - const options = { + const options: Options = { customResolvers: { 'Example API': { '/users/{username}': { @@ -347,7 +348,7 @@ test('Option customResolver with two APIs', () => { }) test('Option customResolver with two APIs and interrelated links', () => { - const options = { + const options: Options = { customResolvers: { 'Example API': { '/users/{username}': { diff --git a/packages/openapi-to-graphql/test/example_gql_server.js b/packages/openapi-to-graphql/test/example_gql_server.js index a9ff89f6..8801148f 100644 --- a/packages/openapi-to-graphql/test/example_gql_server.js +++ b/packages/openapi-to-graphql/test/example_gql_server.js @@ -26,7 +26,7 @@ let oas3 = require('./fixtures/example_oas3.json') openapiToGraphql .createGraphQlSchema(oas, { - fillEmptyResponses: true + idFormats: ['specialIdFormat'] }) .then(({ schema, report }) => { console.log(JSON.stringify(report, null, 2)) diff --git a/packages/openapi-to-graphql/test/fixtures/example_oas.json b/packages/openapi-to-graphql/test/fixtures/example_oas.json index 450ec78f..7644c1f5 100644 --- a/packages/openapi-to-graphql/test/fixtures/example_oas.json +++ b/packages/openapi-to-graphql/test/fixtures/example_oas.json @@ -1113,7 +1113,8 @@ "properties": { "id": { "type": "string", - "description": "The identifier of a company" + "description": "The identifier of a company", + "format": "uuid" }, "name": { "type": "string", @@ -1186,7 +1187,8 @@ "properties": { "patent-id": { "type": "string", - "description": "The id of the patent" + "description": "The id of the patent", + "format": "specialIdFormat" }, "inventor-id": { "type": "string",