rubensworks / GraphQL-LD.js

Linked Data Querying with GraphQL
https://gist.github.com/rubensworks/9d6eccce996317677d71944ed1087ea6
MIT License
103 stars 7 forks source link

Example in README doesn't work anymore #28

Closed pheyvaer closed 4 years ago

pheyvaer commented 4 years ago

Trying the example in the README I get the following error

events.js:291
      throw er; // Unhandled 'error' event
      ^

Error: Invalid JSON (Unexpected "s" at position 1 in state STOP)
    at Parser.proto.charError (/home/pieter/Desktop/temp/20200814-graphqlld/node_modules/jsonparse/jsonparse.js:90:16)
    at Parser.proto.write (/home/pieter/Desktop/temp/20200814-graphqlld/node_modules/jsonparse/jsonparse.js:267:27)
    at Stream.<anonymous> (/home/pieter/Desktop/temp/20200814-graphqlld/node_modules/JSONStream/index.js:23:12)
    at Stream.stream.write (/home/pieter/Desktop/temp/20200814-graphqlld/node_modules/through/index.js:26:11)
    at IncomingMessage.ondata (_stream_readable.js:713:22)
    at IncomingMessage.emit (events.js:326:22)
    at addChunk (_stream_readable.js:303:12)
    at readableAddChunk (_stream_readable.js:275:11)
    at IncomingMessage.Readable.push (_stream_readable.js:218:10)
    at HTTPParser.parserOnBody (_http_common.js:132:24)
Emitted 'error' event on Stream instance at:
    at Stream.onerror (_stream_readable.js:754:14)
    at Stream.emit (events.js:314:20)
    at Parser.parser.onError (/home/pieter/Desktop/temp/20200814-graphqlld/node_modules/JSONStream/index.js:142:12)
    at Parser.proto.charError (/home/pieter/Desktop/temp/20200814-graphqlld/node_modules/jsonparse/jsonparse.js:90:8)
    at Parser.proto.write (/home/pieter/Desktop/temp/20200814-graphqlld/node_modules/jsonparse/jsonparse.js:267:27)
    [... lines matching original stack trace ...]
    at addChunk (_stream_readable.js:303:12)

Tried with installing graphql-ld and graphql-ld-comunica with both yarn (v1.21.1) and npm (v6.14.6), but no difference. Also tried with node versions 12.16.2 and 14.8.0, but also no difference.

rubensworks commented 4 years ago

Looks like this is caused by https://github.com/comunica/comunica/issues/700, which has already been fixed on master. Will check this again once I release Comunica 1.15.1.

rubensworks commented 4 years ago

Fixed in graphql-ld-comunica 1.1.1.