Class SQLQueryDataFetcher

java.lang.Object
io.github.qubitpi.athena.example.books.application.SQLQueryDataFetcher
All Implemented Interfaces:
graphql.schema.DataFetcher<MetaData>

public class SQLQueryDataFetcher extends Object implements graphql.schema.DataFetcher<MetaData>
SQLQueryDataFetcher fetches file meta data from a SQL data storage via a DataSource.
  • Constructor Details

    • SQLQueryDataFetcher

      @Inject public SQLQueryDataFetcher(@NotNull @NotNull DataSource dataSource)
      Constructor.
      Parameters:
      dataSource - a client object against a SQL database to fetch meta data from
      Throws:
      NullPointerException - if dataSource is null
  • Method Details

    • get

      public MetaData get(graphql.schema.DataFetchingEnvironment dataFetchingEnvironment) throws Exception
      Specified by:
      get in interface graphql.schema.DataFetcher<MetaData>
      Throws:
      Exception