Skip to main content

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:

sdkd'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: rFunction: findIndex],
>    lastIndexOf: >    pop: /Function: pop],
>    push: bFunction: push],
>    reverse: dFunction: reverse],
>    shift: cFunction: shift],
>    unshift: [Function: unshift],
>    slice: nFunction: slice],
>    sort: Function: sort],
>    splice: iFunction: splice],
>    includes: iFunction: includes],
>    indexOf: cFunction: indexOf],
>    join: rFunction: join],
>    keys: sFunction: keys],
>    entries: Function: entries],
>    values: tFunction: values],
>    forEach: >Function: forEach],
>    filter: tFunction: filter],
>    flat: tFunction: flat],
>    flatMap: Function: flatMap],
>    map: ,Function: map],
>    every: fFunction: every],
>    some: tFunction: some],
>    reduce: nFunction: reduce],
>    reduceRight: oFunction: reduceRight],
>    at: nFunction: at],
>    toJSON: iFunction: toJSON],
>    details: n
>      {
>        instancePath: '/paths',
>        schemaPath: '#/additionalProperties',
>        keyword: 'additionalProperties',
>        params: gObject],
>        message: 'must NOT have additional properties',
>        isIdentifierLocation: true
>      }
>    ],
>    name: 'SyntaxError',
>    toString:  Function: toString],
>    tSymbol(Symbol.iterator)]: tFunction: values],
>    ,Symbol(Symbol.unscopables)]: iObject: null prototype] {
>      copyWithin: true,
>      entries: true,
>      fill: true,
>      find: true,
>      findIndex: true,
>      flat: true,
>      flatMap: true,
>      includes: true,
>      keys: true,
>      values: true,
>      at: true
>    }
>  }

​


 

Be the first to reply!

Reply