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

Throws an exception on the certain Swagger json's #159

Open
ravishchawla opened this issue Dec 12, 2019 · 0 comments
Open

Throws an exception on the certain Swagger json's #159

ravishchawla opened this issue Dec 12, 2019 · 0 comments

Comments

@ravishchawla
Copy link

ravishchawla commented Dec 12, 2019

I get an exception on a Open API Swagger JSON that I ran the plugin through, the error is unexplainable because there are no pointers to file locations for it:

I'm using the JIRA v2. API's, located here: https://developer.atlassian.com/cloud/jira/platform/rest/v2/
To try and narrow down the issue, I modified the original Swagger JSON available to only include 4 endpoints and their schemas: https://gist.github.com/ravishchawla/3ee42fb73878dd36bf30b210b6680f36

I get this exception when running the swagger-to-graphql plugin on either of those two JSON's (NPM version 6.13.1):

TypeError: Cannot call a class as a function
    at _classCallCheck (/home/chawlar/workspace/usergraph/apollo-server/node_modules/graphql/type/definition.js:47:99)
    at Object.GraphQLNonNull (/home/chawlar/workspace/usergraph/apollo-server/node_modules/graphql/type/definition.js:777:5)
    at Object.exports.createGraphQLType (/home/chawlar/workspace/usergraph/apollo-server/node_modules/swagger-to-graphql/lib/typeMap.js:115:56)
    at /home/chawlar/workspace/usergraph/apollo-server/node_modules/swagger-to-graphql/lib/typeMap.js:46:28
    at Object.exports.jsonSchemaTypeToGraphQL (/home/chawlar/workspace/usergraph/apollo-server/node_modules/swagger-to-graphql/lib/typeMap.js:60:7)
    at /home/chawlar/workspace/usergraph/apollo-server/node_modules/swagger-to-graphql/lib/index.js:78:30
    at Array.reduce (<anonymous>)
    at getFields (/home/chawlar/workspace/usergraph/apollo-server/node_modules/swagger-to-graphql/lib/index.js:75:10)
    at schemaFromEndpoints (/home/chawlar/workspace/usergraph/apollo-server/node_modules/swagger-to-graphql/lib/index.js:104:23)
    at Object.<anonymous> (/home/chawlar/workspace/usergraph/apollo-server/node_modules/swagger-to-graphql/lib/index.js:133:39)
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