Giter Club home page Giter Club logo

Comments (8)

nmaquet avatar nmaquet commented on May 18, 2024 3

@harshmttl @ihac we're currently working on fixing a number of issues related to this. We'll release a new Bramble update in a week or two that should solve this.

from bramble.

pkqk avatar pkqk commented on May 18, 2024

Hi @ihac

This should work, bramble currently has no protections against query complexity other than a timeout on execution time, so recursing down to dependent services should be fine.

I'm assuming you've cut out the fields on Query for looking up the @boundary types in the example schemas.

Can you share these example services so we could run a test with them?

from bramble.

ihac avatar ihac commented on May 18, 2024

Hi @pkqk here is the repo: https://github.com/ihac/graphql-poc-playground/tree/master/bramble-federation if you wanna run a test.

And below are some failed queries (we expected them to work though):

query {
  randomContentWithScoreCard { # resolved by content service.
    id
    title
    score { # resolved by social service
      teamAScore
      teamBScore
      ads { # should be resolved by ads service
        id
        message # cannot query field "message" on type "TinyAdsBanner"
      }
    }
  }
}
# Same issue as above
query {
  masthead_v2(count: 10) { # resolved by masthead service
    __typename
    contentItemsWithScoreCard { # resolved by content service
      id
      title
      score { #should be resolved by social service
        id
        teamAScore # cannot query field "teamAScore" on type "ScoreCard"
      }
    }
  }
}

Also, we tried the federation on union types, but it didn't seem to work. Is this as we expected as well?

query {
  masthead(count: 5) {
    __typename
    ... on ContentItem {
      id
      title
    }
    ... on ContentItemWithScoreCard {
      id
      title
    }
    ... on ScoreCard {
      id
    }
  }
}

The query above even caused a panic in Bramble: runtime error: invalid memory address or nil pointer dereference when it tried to marshal the result into response.

Thanks for help and also your great work!

from bramble.

harshmttl avatar harshmttl commented on May 18, 2024

Any updates here?

from bramble.

gmac avatar gmac commented on May 18, 2024

To clarify – the issue title questions the support for multi-sourcing field across schemas (which is slightly inconvenient but not really broken), whereas the issue discussed here (that I also quickly ran into) is with graph traversal. The traversal issue is in the works?

from bramble.

gmac avatar gmac commented on May 18, 2024

@ihac – I suspect that your report about abstract type failures (unions) may be related to #81 based on your query. I haven't been able to trigger panic, but panic itself may be a side effect of your logging.

from bramble.

gmac avatar gmac commented on May 18, 2024

@ihac — the original issue that you reported with deeply-nested fields not delegating properly was a big problem that I also ran into quickly. There’s a fix in the works here #85.

from bramble.

ihac avatar ihac commented on May 18, 2024

@gmac Thanks for the quick fix. Yes the issue title might be ambiguous as we're actually discussing about the graph traversal here.

As for the panic, it happened only when we queried the federated union types. I'll try once again to see whether I could reproduce it with your recent patches included.

from bramble.

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.