Skip to content
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

Error in generating types from valid WSDL's using GraphQL-mesh Soap plugin #4647

Open
4 tasks
hswkluwer opened this issue Oct 7, 2022 · 0 comments
Open
4 tasks

Comments

@hswkluwer
Copy link

Issue workflow progress

Progress of the issue based on the Contributor Workflow

  • 1. The issue provides a reproduction available on Github, Stackblitz or CodeSandbox
  • 2. A failing test has been provided
  • 3. A local solution has been provided
  • 4. A pull request is pending review

Describe the bug

Generating a schema from a valid WSDL file results in an error

To Reproduce
Steps to reproduce the behavior:

https://codesandbox.io/s/elegant-cache-jssohs

  1. Run the project by running the command npm run dev
  2. Notice we get the following error when running starting the graphql-mesh server

Mesh - Example1DoesntWork could not resolve input type 'PeriodType'; using GraphQLString 💥 🕸️ Mesh - Example1DoesntWork Failed to generate the schema TypeError: Cannot read properties of undefined (reading 'forEach') at GraphqlInputFieldResolver.appendObjectTypeFields (\graphql-demo\node_modules\@graphql-mesh\soap\index.js:485:25) at GraphqlInputFieldResolver.appendObjectTypeFields (\graphql-demo\node_modules\@graphql-mesh\soap\index.js:491:18) at fields (\graphql-demo\node_modules\@graphql-mesh\soap\index.js:476:18) at resolveObjMapThunk (\graphql-demo\node_modules\graphql\type\definition.js:504:40) at defineInputFieldMap (\graphql-demo\node_modules\graphql\type\definition.js:1313:20) at GraphQLInputObjectType.getFields (\graphql-demo\node_modules\graphql\type\definition.js:1276:27) at collectReferencedTypes (\graphql-demo\node_modules\graphql\type\schema.js:395:51) at collectReferencedTypes (\graphql-demo\node_modules\graphql\type\schema.js:391:11) at new GraphQLSchema (\graphql-demo\node_modules\graphql\type\schema.js:183:7) at soapGraphqlSchema (\graphql-demo\node_modules\@graphql-mesh\soap\index.js:937:12) 💥 🕸️ 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 (\graphql-demo\node_modules\@graphql-mesh\runtime\index.js:318:15) at processTicksAndRejections (node:internal/process/task_queues:96:5)

  1. Comment out the first source and uncomment the second source with the name Example1Works and run it. It compiles but is unable to create proper types as we can see from the output

💡 🕸️ Mesh - Server Generating the unified schema... ⚠️ 🕸️ Mesh - Example1Works could not resolve output type ' ArrayOfTodoMessage '; using GraphQLJSON instead ⚠️ 🕸️ Mesh - Example1Works could not resolve input type 'FileClass'; using GraphQLString ⚠️ 🕸️ Mesh - Example1Works could not resolve input type 'UpdateClass'; using GraphQLString ⚠️ 🕸️ Mesh - Example1Works could not resolve input type 'TodoMessage'; using GraphQLString

  1. Comment out the second source and uncomment the third source with the name Example2-works and run. It compiles and is able to create the schema/types correctly

The wsdls Example1-doesntwork.wsdl and /Example1-works/Example1-works.wsdl should be the same with the only different being that /Example1-works/Example1-works.wsdl is expanded out into multiple files while the former is all contained in one file

The difference between Example1-doesntwork.wsdl and Example2-works.wsdl is that the type FileClass is assigned a different namespace.

These are all valid WSDL's and soapui is able to create operations with valid schema from them

Expected behavior

GraphQL-mesh soap to create a proper schema/type for all the WSDL examples

Environment:

  • OS: Windows 10 pro
  • @graphql-mesh/...:
  • NodeJS: v16.13.0

Additional context

@theguild-bot theguild-bot mentioned this issue Oct 11, 2022
@theguild-bot theguild-bot mentioned this issue Sep 28, 2023
This was referenced Apr 30, 2024
This was referenced May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant