Skip to content

@BatchMapping support @Argument #232

Closed
@dugenkui03

Description

@dugenkui03

I think that both source and argument are necessary. It will great that @BatchingMapping support @Argument.

Schema like blow. 'like' means whether the visitor like this book or author, and Book.author bind DataLoader.

type Query{
      books(visitorId:Int, bookIds:[Int]):[Book]
}

type Book{
    id: Int
    like: Boolean
    authorId: Int
    author(visitorId:Int): Author
}

type Author{
    id: Int
    name: String
    like: Boolean
}

query like blow:

query ($visitorId: Int){
   books(visitorId:$visitorId, bookIds:[1,2,3]){
      authorId
      # need visitorId
       author(visitorId:$visitorId){
             id
       }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions