Skip to main content
Question

problem using example in NodeJs

  • January 13, 2022
  • 0 replies
  • 410 views

rodolfo-silva5

Hi, I'm using node, and I got the example in the documentation, but when I run it, it gives me this error, and on the site where the example is executed, it's running normally.

Thanks.

Link example: https://developers.pipefy.com/reference/graphql-endpoint

 

Code:

sdk['graphql-endpoint']({  query: '{allCards(pipeId: 302194528){edges{node{id}}}}'}, {  Authorization: 'Bearer *token*'})  .then(res => console.log(res))  .catch(err => console.error(err))

 

Response:

​
{
>    '0': {
>      instancePath: '/paths',
>      schemaPath: '#/additionalProperties',
>      keyword: 'additionalProperties',
>      params: { additionalProperty: '' },
>      message: 'must NOT have additional properties',
>      isIdentifierLocation: true
>    },
>    stack: 'SyntaxError: OpenAPI schema validation failed.\n' +
>      '\n' +
>      'ADDITIONAL PROPERTY must NOT have additional properties\n' +
>      '\n' +
>      '  24 |   ],\n' +
>      '  25 |   "paths": {\n' +
>      '> 26 |     "": {\n' +
>      '     |     ^^    is not expected to be here!\n' +
>      '  27 |       "post": {\n' +
>      '  28 |         "summary": "Example",\n' +
>      '  29 |         "description": "",\n' +
>   
>    message: 'OpenAPI schema validation failed.\n' +
>      '\n' +
>      'ADDITIONAL PROPERTY must NOT have additional properties\n' +
>      '\n' +
>      '  24 |   ],\n' +
>      '  25 |   "paths": {\n' +
>      '> 26 |     "": {\n' +
>      '     |     ^^    is not expected to be here!\n' +
>      '  27 |       "post": {\n' +
>      '  28 |         "summary": "Example",\n' +
>      '  29 |         "description": "",',
>    length: 1,
>    concat: [Function: concat],
>    copyWithin: [Function: copyWithin],
>    fill: [Function: fill],
>    find: [Function: find],
>    findIndex: [Function: findIndex],
>    lastIndexOf: [Function: lastIndexOf],
>    pop: [Function: pop],
>    push: [Function: push],
>    reverse: [Function: reverse],
>    shift: [Function: shift],
>    unshift: [Function: unshift],
>    slice: [Function: slice],
>    sort: [Function: sort],
>    splice: [Function: splice],
>    includes: [Function: includes],
>    indexOf: [Function: indexOf],
>    join: [Function: join],
>    keys: [Function: keys],
>    entries: [Function: entries],
>    values: [Function: values],
>    forEach: [Function: forEach],
>    filter: [Function: filter],
>    flat: [Function: flat],
>    flatMap: [Function: flatMap],
>    map: [Function: map],
>    every: [Function: every],
>    some: [Function: some],
>    reduce: [Function: reduce],
>    reduceRight: [Function: reduceRight],
>    at: [Function: at],
>    toJSON: [Function: toJSON],
>    details: [
>      {
>        instancePath: '/paths',
>        schemaPath: '#/additionalProperties',
>        keyword: 'additionalProperties',
>        params: [Object],
>        message: 'must NOT have additional properties',
>        isIdentifierLocation: true
>      }
>    ],
>    name: 'SyntaxError',
>    toString: [Function: toString],
>    [Symbol(Symbol.iterator)]: [Function: values],
>    [Symbol(Symbol.unscopables)]: [Object: null prototype] {
>      copyWithin: true,
>      entries: true,
>      fill: true,
>      find: true,
>      findIndex: true,
>      flat: true,
>      flatMap: true,
>      includes: true,
>      keys: true,
>      values: true,
>      at: true
>    }
>  }

​


 

0 replies

Be the first to reply!

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings