Do I have to manually make a `node` query in Absinthe to honor Global Object Identification?
I am using a SvelteKit library called Houdini to consume a GraphQL endpoint I am creating in Ash.
I've intentionally marked my
graphql, queries, list
with relay?: true
per the docs:
https://ash-hq.org/docs/dsl/ash-resource#graphql-queries-list-relay-
While pulling the schema for the frontend code, I get this error:
My observation is that my AshGraph is generating the
part just fine, but I do not see the
Is the expectation that I should have to write a manual node
query and resolver inside the Absinthe schema file such that my graph honored the Global Object Identification spec? Or is there someway to nudge AshGraph to generate this for me?10 Replies
š¤ I believe you'll need to make that yourself. You can add a custom query into the absinthe spec directly
With that said, is the idea that you can get any instance of anything using just an
id
?I think so. It uses a spread thing (not sure the right name) to id the type.
https://relay.dev/docs/guides/graphql-server-specification/#object-identification
inline fragment
I think is the name.
https://graphql.org/learn/queries/#inline-fragmentsThere is some difficulty there, because you could do this:
So unless you know how to figure out what type of thing you're looking for for every type of thing that can be fetched using just the id (like using prefixed uuids or something) then that would be problematic
I think the relay standard is to base64 encode the type and the id like
car:123
into that string.oh, how interesting
well, its not doing that currently š
we could add that feature into the node behavior relatively easily
But the curious thing is, the GraphQL library I'm using is not outright a Relay thing, but it demands "conform to the Global Identification Spec" and then links to that
graphql.org
page. -- Being a noob I'm not sure where to look for what atm.hm....pretty interesting
seems like there should be a way to bypass that warning
well, error it looks like
or you could just add the query and have it raise an error
using absinthe directly I mean
I think I might be able to configure Houdini to look for other fields to resolve.

I'm going to close this with the workaround for future searches that, yes you can do this, but currently, it would be by hand in Absinthe.
Yeah, that makes sense. It sounds like a nice feature to be able to enable that global node in ash_graphql