robojones / gqltest Goto Github PK
View Code? Open in Web Editor NEWGraphQL API testing tool
GraphQL API testing tool
The draft syntax which aims to use the @expect
directive for all comparable types. This requires the usage of a union type which is not supported by the current graphql syntax.
@expect(v: "hello")
@expect(v: 5)
This syntax would need v
to have a union type which contains String and Int.
There are two alternatives to work around the usage of a union type:
directive @expect(string: String, int: Int, float: Float, boolean: Boolean, id: ID)
This approach allows the user to use the directive like this:
@expect(string: "hello")
The problem is that the directive definition would allow the user to specify multiple values:
@expect(string: "hello", int: 15)
Another problem is that when using variables these could use optional types which is not intended.
@expectString(equal: "hello")
@expectInt(equal: 15)
This syntax is less good looking but allows for easier verification. The problem here is that the user could use multiple different @expect*
directives on the same field.
If a test file contains a query:
query testUserName @test {
user {
name @expect(v: "Frank")
}
}
The only thing that is actually sent to the API is query
everything else is omitted.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.