Class DataFetchersDelegateCommentedImpl

java.lang.Object
org.allGraphQLCases.server.impl.DataFetchersDelegateCommentedImpl
All Implemented Interfaces:
DataFetchersDelegateCommented

@Component
public class DataFetchersDelegateCommentedImpl
extends Object
implements DataFetchersDelegateCommented
Author:
etienne-sf
  • Constructor Details

  • Method Details

    • comments

      public List<String> comments​(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment, Commented source)
      Description copied from interface: DataFetchersDelegateCommented
      This method loads the data for Commented.comments.
      Specified by:
      comments in interface DataFetchersDelegateCommented
      Parameters:
      dataFetchingEnvironment - The GraphQL DataFetchingEnvironment. It gives you access to the full GraphQL context for this DataFetcher
      source - The object from which the field is fetch. In other word: the aim of this data fetcher is to fetch the comments attribute of the origin, which is an instance of {InterfaceType {name:Commented, fields:{Field{name:nbComments, type:Int, params:[]},Field{name:comments, type:[String], params:[]}}, comments ""}. It depends on your data modle, but it typically contains the id to use in the query.