Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/mnie/fscheck.graphql
- Owner: MNie
- License: mit
- Created: 2018-08-13T04:52:19.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-13T06:19:57.000Z (over 4 years ago)
- Last Synced: 2024-10-11T13:21:20.918Z (28 days ago)
- Topics: fscheck, fscheck-tests, graphql, graphql-query
- Language: F#
- Size: 16.6 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.