Skip to content

szymongaertig/GraphQl.Extensions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build status

GraphQl.Extensions

Extensions for GraphQl library

Get it on NuGet:

PM> Install-Package GraphQl.Extensions

Available extensions:

  • TryExportToDataTable - allows converting result of ExecutionResult class to DataTable.

Available OutputFormatters:

  • GraphQlXlsxFormatter - generates xlsx output from generated GraphQlResult (only for flat data structure)
  • GraphQlCsvFormatter - generates csv output from generated GraphQlResult (only for flat data structure)

Usage

To enable output formatters, you need to add to the ConfigureServices method from startup.cs:

                services.AddMvc(options =>
                {
                    options.RespectBrowserAcceptHeader = true;
                    options.OutputFormatters.Add(new GraphQlCsvFormatter("entity_type", ";", Encoding.UTF8));
                    options.OutputFormatters.Add(new GraphQlXlsxFormatter("entity_type"));

                })

Samples are available here:

https://github.com/garfieldos/GraphQl.Extensions/tree/master/src/samples/GraphQl.Extensions.Samples.AspNetCore

About

Extensions for GraphQl library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages