Fork me on GitHub
#pathom
<
2022-05-13
>
sheluchin12:05:33

Does Pathom support field aliases from GraphQL? To make batch queries like this possible, for example:

{
  x: search(query: "sheluchin", type: USER, first: 10) {
    edges {
      node {
        ... on User {
          createdAt
        }
      }
    }
  }
  y: search(query: "sheluchin", type: USER, first: 10) {
    edges {
      node {
        ... on User {
          createdAt
        }
      }
    }
  }
}

wilkerlucio12:05:22

not supported yet

sheluchin12:05:54

Thanks @U066U8JQJ. Would you like an issue for that?

wilkerlucio13:05:57

other than that, the previous fixes solved the things you needed? (just checking :))

sheluchin13:05:27

I'm digging into it right now 🙂 I'll let you know.

sheluchin13:05:50

@U066U8JQJ actually it doesn't look like the fix worked for the first case. Or maybe I'm not doing it right. In any case, when calling the resolver like this the result is the same as reported in the ticket:

(p/let [result (p.eql/process (add-github-gql-to-env)
                    {:github.Organization/login "fulcrologic"}
                    [:github.Organization/all-repos])]
    (tap> result))
But for the second case (GitHub Search) looks fixed.
com.wsscode/pathom3                    {:mvn/version "2022.04.20-alpha"}                          
wilkerlucio/pathom3-graphql            {:git/url "[email protected]:wilkerlucio/pathom3-graphql.git" 
                                        :sha "d04ead86d8038570eb0a2d01cf89705957531693"}          

sheluchin13:05:36

And as before, if I comment this out in the query:

{:github.Repository/owner [:github.RepositoryOwner/id]}
It works.

wilkerlucio13:05:28

@UPWHQK562 did you bump Pathom 3 as well? you need to use main there

wilkerlucio13:05:44

this commit: 28956c7f5d6dd259effc09567829c096932714a7

sheluchin13:05:56

Ah, my bad.. I assumed it was in 04.20. Can confirm it works on that commit! Thank you 🙏

🎉 1
wilkerlucio13:05:25

no worries, its because that bug was a Pathom 3 one related to dynamic query process 😉