Awesome Open Source
Awesome Open Source

FsCheck.GraphQL NuGet

A library which helps to create GraphQL queries for FsCheck tests.

How to use it? You have to implement a QueryTestArbitrary class in your code and in your own implementation invoke build or buildWithArgs depending on the query which you want to generate.

type CustomQueryArb() =
    inherit QueryTestArbitrary<CustomQuery>()

    member this.create resolver = resolver

type CustomQueryWithArgsArb() =
    inherit QueryTestArbitrary<CustomQueryWithArgs>()

    member this.create resolver fetchArg = this.buildWithArgs resolver fetchArg

Where resolver is a function to gather an instance of all GraphQL types in your project. fetchArgs whereas is a function to gather all arguments to a query.

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Graphql (8,245
F Sharp (5,110
Related Projects