Giter Club home page Giter Club logo

Comments (4)

stevecalvert avatar stevecalvert commented on September 24, 2024

It looks like ksqldb-graphql is dependent on KLIP-15, which is still marked as a Proposal and has alas not been progressed since Feb 2020. @purplefox, any news on getting this merged? MEanwhile, is there an alternative solution for a GraphQL / ksqlDB integration?

from ksqldb-graphql.

purplefox avatar purplefox commented on September 24, 2024

KLIP-15 was completed and merged some time back.

from ksqldb-graphql.

purplefox avatar purplefox commented on September 24, 2024

"This endpoint is only available when using HTTP2"

Seems like the ride share app is not using HTTP2. /cc @colinhicks

from ksqldb-graphql.

stevecalvert avatar stevecalvert commented on September 24, 2024

Thanks, @purplefox, I was misled by the KLIP directory not being up to date.
Runing Wireshark on localhost, it appears Rideshare graphql server (acting as client to ksqlDB) does attempt HTTP/2 with a MAGIC+SETTINGS packet:

HyperText Transfer Protocol 2
    Stream: Magic
        Magic: PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n
    Stream: SETTINGS, Stream ID: 0, Length 0
        Length: 0
        Type: SETTINGS (4)
        Flags: 0x00
            .... ...0 = ACK: False
            0000 000. = Unused: 0x00
        0... .... .... .... .... .... .... .... = Reserved: 0x0
        .000 0000 0000 0000 0000 0000 0000 0000 = Stream Identifier: 0

and gets back a HTTP/1.1 426 Upgrade Required from ksqlDB

HTTP/1.1 426 Upgrade Required
Content-Type: text/html;charset=iso-8859-1
Content-Length: 59
Connection: close

<h1>Bad Message 426</h1><pre>reason: Upgrade Required</pre>

at which point Rideshare just replies with an HTTP/2 GOAWAY and the HTTP/2 connection does not proceed although the server does go on to successfully interrogate ksqldb-server on localhost:8088 under HTTP/1.1 to extract the stream/table schemas.
The Rideshare server log reports:

Error [ERR_HTTP2_ERROR]: Protocol error
    at Http2Session.onSessionInternalError (internal/http2/core.js:747:26) {
  code: 'ERR_HTTP2_ERROR',
  errno: -505
}

Any GraphQL query, such as below from the frontend always fails with the following response:

{
  "errors": [
    {
      "message": "The session has been destroyed",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "PAGEVIEWS_FEMALE"
      ],
      "extensions": {
        "code": "INTERNAL_SERVER_ERROR",
        "exception": {
          "code": "ERR_HTTP2_INVALID_SESSION",
          "stacktrace": [
            "Error [ERR_HTTP2_INVALID_SESSION]: The session has been destroyed",
            "    at ClientHttp2Session.request (internal/http2/core.js:1600:13)",
            "    at AsyncIteratorQueryStream.initQueryStream (/Users/steve/vsys/ksqldb-graphql/packages/ksqldb-client/src/queryStream.ts:74:33)",
            "    at AsyncIteratorQueryStream.[Symbol.asyncIterator] (/Users/steve/vsys/ksqldb-graphql/packages/ksqldb-client/src/queryStream.ts:112:50)",
            "    at __asyncValues (/Users/steve/vsys/ksqldb-graphql/packages/ksqldb-graphql/src/resolvers.ts:14:18)",
            "    at ResolverGenerator.<anonymous> (/Users/steve/vsys/ksqldb-graphql/packages/ksqldb-graphql/src/resolvers.ts:186:29)",
            "    at Generator.next (<anonymous>)",
            "    at /Users/steve/vsys/ksqldb-graphql/packages/ksqldb-graphql/src/resolvers.ts:8:71",
            "    at new Promise (<anonymous>)",
            "    at __awaiter (/Users/steve/vsys/ksqldb-graphql/packages/ksqldb-graphql/src/resolvers.ts:4:12)",
            "    at ResolverGenerator.handleQueryResolve (/Users/steve/vsys/ksqldb-graphql/packages/ksqldb-graphql/src/resolvers.ts:180:97)"
          ]
        }
      }
    }
  ],
  "data": {
    "PAGEVIEWS_FEMALE": null
  }
}

I'm runnining ksqldb-graphql server against Confluent Docker ksqlDB stack, all on macOS localhost.

from ksqldb-graphql.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.