-
I'm trying to consume the DeepL API through the new OpenAPI handler. I'm using this API spec. With this sources:
- name: DeepL
handler:
newOpenapi:
oasFilePath: https://raw.githubusercontent.com/DeepLcom/openapi/main/openapi.json 💥 🕸️ Mesh - DeepL Failed to generate the schema TypeError: Cannot read properties of undefined (reading 'trim')
at Object.sanitizeNameForGraphQL (/private/tmp/x/node_modules/@graphql-mesh/utils/index.js:396:36)
at getJSONSchemaOptionsFromOpenAPIOptions (/private/tmp/x/node_modules/@omnigraph/openapi/index.js:86:39)
at async Object.createBundle (/private/tmp/x/node_modules/@omnigraph/openapi/index.js:332:82)
at async Object.getWithSet (/private/tmp/x/node_modules/@graphql-mesh/store/index.js:155:38)
at async OpenAPIHandler.getMeshSource (/private/tmp/x/node_modules/@graphql-mesh/new-openapi/index.js:38:24)
at async /private/tmp/x/node_modules/@graphql-mesh/runtime/index.js:41:28
💥 🕸️ Mesh An error occured while writing the schema file: Error: Schemas couldn't be generated successfully. Check for the logs by running Mesh with DEBUG=1 environmental variable to get more verbose output.
at Object.getMesh (/private/tmp/x/node_modules/@graphql-mesh/runtime/index.js:71:15)
💥 🕸️ Mesh An error occurred while building the artifacts: Error: Schemas couldn't be generated successfully. Check for the logs by running Mesh with DEBUG=1 environmental variable to get more verbose output.
at Object.getMesh (/private/tmp/x/node_modules/@graphql-mesh/runtime/index.js:71:15)
💥 🕸️ Mesh - Server Error: Schemas couldn't be generated successfully. Check for the logs by running Mesh with DEBUG=1 environmental variable to get more verbose output.
at Object.getMesh (/private/tmp/x/node_modules/@graphql-mesh/runtime/index.js:71:15)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. When debugging, it looks like there might be
The spec validates nicely in swagger editor. It generates some warnings when linted using the redocly CLI ( Can anyone spot if there's something off with the API? Am I missing something? Or is it a bug in the handler? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
I got the same error message, logged out one of the definitions at which mesh failed and built a simpler schema with it; and it did not fail; so I am also wondering if this is an issue with library. Happy to open an issue or provide the schema. |
Beta Was this translation helpful? Give feedback.
-
We have also encountered issues with Swagger 2 and Open API 3 specs and have switched over to openapi-to-graphql + Yoga in those scenarios for 800+ API specs. |
Beta Was this translation helpful? Give feedback.
-
Sorry for the lag, but I can confirm that the DeepL API spec loads nicely now1! Thanks a ton. 🥳 🙏 Footnotes
|
Beta Was this translation helpful? Give feedback.
Sorry for the lag, but I can confirm that the DeepL API spec loads nicely now1! Thanks a ton.
There still is an issue (they have an endpoint not using
application/json
but form-data), but that's another discussion. Just including it here in case s/o stumbles upon it.🥳 🙏
Footnotes
With @graphql-mesh/[email protected], @graphql-mesh/[email protected], [email protected] ↩