graphql_starwars_test_server

Last updated:

0 purchases

graphql_starwars_test_server Image
graphql_starwars_test_server Images
Add to Cart

Description:

graphql starwars test server

A simple starwars schema server adapted from the angel starwars example for use in testing graphql clients, such as graphql_flutter.
The schema it aims to implement is in schema.graphql, and the seed data is mostly in data.json.
The server is heavily limited:

recursive relationships aren't entirely supported
a lot of mutations seem broken

To run, add as a dependency and
pub run graphql_starwars_test_server
# --host 127.0.0.1
# --port 3000
# --enableCors true # false to disable cors
# --generateReviews true # false to disable review generation
# for subscription testing
copied to clipboard
Here are some working test operations:
mutation {
modifyHuman(id: "1001", data: { name: "Anikin" }) {
id
name
friends {
name
}
}
}

{
humans {
id
name
friends {
name
}
}
}

subscription reviewAdded {
reviewAdded {
stars
commentary
episode
}
}
copied to clipboard
The server will generate a fake review for testing streams every 10 seconds, unless --generateReviews=false
schema.graphql generated with get-graphql-schema http://127.0.0.1:3000/graphql > schema.graphql
You can also disable cors with the env variable --enableCors=false

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.