Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mnie/fscheck.graphql

Library which helps creating GraphQL queries for FsCheck tests
https://github.com/mnie/fscheck.graphql

fscheck fscheck-tests graphql graphql-query

Last synced: 28 days ago
JSON representation

Library which helps creating GraphQL queries for FsCheck tests

Awesome Lists containing this project

README

        

# FsCheck.GraphQL [![NuGet](https://buildstats.info/nuget/FsCheck.GraphQL?includePreReleases=true)](https://www.nuget.org/packages/FsCheck.GraphQL)

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.

```fsharp
type CustomQueryArb() =
inherit QueryTestArbitrary()

member this.create resolver = base.build resolver

type CustomQueryWithArgsArb() =
inherit QueryTestArbitrary()

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.