question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot create property '_openAPIToGraphQL' on number

See original GitHub issue
openapi-to-graphql/lib/resolver_builder.js:505
                                                element[exports.OPENAPI_TO_GRAPHQL] = {
                                                                                    ^

TypeError: Cannot create property '_openAPIToGraphQL' on number '99000006'
    at /opt/nodejs/gate_rest_graph/node_modules/openapi-to-graphql/lib/resolver_builder.js:505:85
    at Array.forEach (<anonymous>)
    at Request._callback (/opt/nodejs/gate_rest_graph/node_modules/openapi-to-graphql/lib/resolver_builder.js:503:50)
    at Request.self.callback (/opt/nodejs/gate_rest_graph/node_modules/request/request.js:185:22)
    at Request.emit (node:events:369:20)
    at Request.<anonymous> (/opt/nodejs/gate_rest_graph/node_modules/request/request.js:1154:10)
    at Request.emit (node:events:369:20)
    at IncomingMessage.<anonymous> (/opt/nodejs/gate_rest_graph/node_modules/request/request.js:1076:12)
    at Object.onceWrapper (node:events:475:28)
    at IncomingMessage.emit (node:events:381:22)

Library version 2.3.0

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:4
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
Alan-Chacommented, Jun 4, 2021

@KolbySisk Sorry for the delay. I would like to take a look at this issue today. I’ll let you know if I discover anything.

@Kichrum No, this library should be able to support anything in the response, primitive, objects, arrays of primitives, arrays of objects, even more complex cases like objects using oneOf (which should generate a union type).

2reactions
daniloalexandrecommented, Jul 7, 2021

Hi, Everyone, Have you advanced with this issue? I’m facing the same problem with string arrays.

OAS:

responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
                  example: Cielo

Exception:

ERROR: uncaughtException: Cannot create property '_openAPIToGraphQL' on string 'Cielo'
TypeError: Cannot create property '_openAPIToGraphQL' on string 'Cielo'```
Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot create property on string - javascript - Stack Overflow
Empty Objects need to be individually created before their values are assigned. And use of const is not a good idea here, anyway,...
Read more >
openapi-to-graphql - npm
Generates a GraphQL schema for a given OpenAPI Specification (OAS). Latest version: 2.6.3, last published: 10 months ago.
Read more >
Model | LoopBack Documentation
For example, properties and relations cannot be defined through the model decorator. ... type: 'string', }) public name: string; @property({ type: 'number', ...
Read more >
magento2 - Cannot create property 'cart' on string '{}lax'
The problem is due to a feature in Magento called 'section' or 'private data'. It is intricate to debug. I suggest to check...
Read more >
(PDF) A Link Generator for Increasing the Utility of OpenAPI-to ...
A Link Generator for Increasing the Utility of OpenAPI-to-GraphQL Translations. April 2020 ... being very developer-friendly, those properties make GraphQL.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found