Skip to content

Library which helps creating GraphQL queries for FsCheck tests

License

Notifications You must be signed in to change notification settings

MNie/FsCheck.GraphQL

Repository files navigation

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 = base.build 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.

About

Library which helps creating GraphQL queries for FsCheck tests

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages