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: 4 months 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 (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-05-13T06:19:57.000Z (about 5 years ago)
- Last Synced: 2024-12-20T01:08:13.324Z (5 months 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 [](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.