Closed sheluchin closed 2 years ago
Just pushed the commit https://github.com/wilkerlucio/pathom3-graphql/commit/69390399075cb2203f061ad037b134553efd1f40 on the GraphQL library that will output the correct results.
That said, I still see a problem in optimization. Currently, this code will call the GraphQL downstream twice, which is undesirable given it can be done in a single request. That goes down to Pathom planner optimizations, I'm currently figuring out how to safely optimize this scenario, so it makes a single request. This is the Graph I've been working on, using this query:
[{:repo-list
[:github.Repository/stargazerCount
:github.Repository/description]}]
This should be merged.
Closing this for now, the other issue related to optimization, for now its working (also, not a bug in Pathom 3, but in Pathom 3 GraphQL, fixed over there)
It looks like
::p.gql/root-entries-map
entrypoints do not get re-used for all attributes in the request. My expectation is that if a request contains all of the attributes necessary for a GraphQL entrypoint, the entrypoint input requirements are satisfied.In this example, there is a
repository
entrypoint. It can be used to pull data like:github.Repository/stargazerCount
and:github.Repository/description
. Requesting those attributes in separate requests produces the correct results, but if both attributes are combined into a single request, the latter one fails because it does not receive the entrypoint data.I created a repro for this at: https://github.com/sheluchin/pathom3-graphql/commit/6f00a4d484ca0775963a945932ee5b780d256102. I'm not sure if this is specific to the GraphQL integration, but that's where I'm encountering them in my code, so I used the pathom3-graphql repo as the base.
For
:github.Repository/stargazerCount
:For
:github.Repository/description
: