Skip to content

Ask: Pass parent arguments down to the children #1325

@igloo12

Description

@igloo12

Hi,

I want to add all my filter parameters to the top-level object of the query because I want to filter out top-level items that don't have the child filter parameters.

eg)

I have People -> Address class structure. I want to find all individuals with the name Luke who have addresses in the province of Quebec. I don't want People with no addresses.

My query object is

{
  "name": "Luke'
  "addressWhere:{
    "province": "Quebec"
  }
}

Currently, I am passing down the argument with context.

  if (where != null) {
            graphQLContext.put(contextPersonWhere, where)
        }

Is there a better way to do this? Can I get the parent arguments injected into the @schemamapping object?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions