Code Monkey home page Code Monkey logo

Comments (6)

BoD avatar BoD commented on June 11, 2024

Hi! Thanks for reporting this. Bodies should definitely not be null here, although here they're request (not response) bodies, which makes me think something other than network flakiness may be the root cause. Would you have a way to reproduce this by any chance?

from apollo-kotlin.

ber4444 avatar ber4444 commented on June 11, 2024

Yeah, I realized it happens every time when using

ApolloClient.Builder()
                ...
                .httpBatching()

whereas adding .canBeBatched(true) to the query invocation works fine.

from apollo-kotlin.

ber4444 avatar ber4444 commented on June 11, 2024

we have this as well in the builder, if that matters:

.autoPersistedQueries(
                    // For the initial hashed query that does not send the actual Graphql document
                    httpMethodForHashedQueries = HttpMethod.Get,

                    // For the follow-up query that sends the full document if the initial hashed query was not found
                    httpMethodForDocumentQueries = HttpMethod.Get
                )

from apollo-kotlin.

BoD avatar BoD commented on June 11, 2024

Ah that explains it, thanks.

Indeed, with auto persisted queries configured with GET, requests won't have a body which causes this crash when trying to batch them.

I'm curious to know if your server will support batching and APQ at the same time - you could try with Post instead to confirm.

If you want to use both features in different parts of your code, you can configure them with enableByDefault = false and then enable them on individual calls with .enableAutoPersistedQueries(true) or canBeBatched(true).

from apollo-kotlin.

BoD avatar BoD commented on June 11, 2024

@ber4444 Is there anything else we can do on this?

from apollo-kotlin.

BoD avatar BoD commented on June 11, 2024

Closing for now, don't hesitate to reopen a ticket if you need assistance.

from apollo-kotlin.

Related Issues (20)

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.