GraphQL relations not available

Hi there,

I created a new Ash project with the helpdesk domain and added AshGraphQL. The problem I have is that the relationship of a ticket to a representative is not showing up in the playground.
I followed the getting started guides for Ash itself, AshPostgres (igniter) and AshGraphQL (igniter). There is no error / warning showing up.

Does anybody have a hint what I might have overlooked?

In order for a relationship to appear in the GraphQL API, the destination resource must have the AshGraphql.Resource extension, and be configured with a type.

Thanks for the quick response. I think I added all of those.

Here is the repo in case it helps: GitHub - scflode/ash-playground

I can’t upload images but the playground shows:

type Ticket {
  id: ID!
  subject: String!
}

I would expect

type Ticket {
  id: ID!
  subject: String!
  representative: Representative!
}

instead.

Ah, you’re probably missing public?: true on the representative relationship.

That’s it. Thanks a lot!

Side question: The _id part is always exposed then as well, I guess? Meaning there will be representative and representativeId.

You can also do attribute_public? false

1 Like

Awesome. Thanks!