https://github.com/5t111111/graphql_test
https://github.com/5t111111/graphql_test
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/5t111111/graphql_test
- Owner: 5t111111
- Created: 2018-02-04T07:08:55.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-04T07:10:51.000Z (over 7 years ago)
- Last Synced: 2025-01-12T07:46:53.836Z (5 months ago)
- Language: Ruby
- Size: 28.3 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# graphql_test
GraphQL 試す用の Rails アプリケーション
## Get started
```
$ bundle install
``````
$ bin/rails db:migrate
$ bin/rails db:seed
``````
$ bin/rails s
```Then visit `http://localhost:3000/graphiql` in your browser.
## Query
(Data seeds are still WIP. See current registered seed => https://github.com/5t111111/graphql_test/blob/master/db/seeds.rb)
Fetch a weapon's `id` and `name` with the name "スプラシューター":
```
{
weapon(name: "スプラシューター") {
id
name
}
}
```Fetch all weapons which have "スプラッシュボム" as their sub-weapon:
```graphql
{
sub_weapon(name: "スプラッシュボム") {
id
name
weapons {
edges {
node {
id
name
}
}
}
}
}
```## Mutation
Creating and updating are not supported yet.