'Laravel lighthouse graphql query by relation table value

Is it possible in Laravel lighthouse GraphQL to query by relation table values? For example, I have defined two types.

type Translation {
    id: ID!
    form_group_id: Int!
    group: Group @hasOne
    translation_key: String!
    lv: String
    en: String
    ru: String
}

type Group {
    id: ID!
    name: String!
    translations: [Translation]! @hasMany
}

and I want to query by group name. The code below is just an example of the idea. translation(group.name: String! @eq): Translation @find

I have an idea that this, can be possible with custom resolver, but is there a way using built in eloquent resolvers?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source