
Security News
Researcher Exposes Zero-Day Clickjacking Vulnerabilities in Major Password Managers
Hacker Demonstrates How Easy It Is To Steal Data From Popular Password Managers
A Ruby implementation of Facebook's yet-to-be-released GraphQL specification, inspired by graphql-ruby, but with other/more/less features/bugs.
Add this line to your application's Gemfile:
gem 'gql'
And then execute:
$ bundle
Or install it yourself as:
$ gem install gql
TODO: Write usage instructions here
Run bin/console
for an interactive prompt (loaded with example models/data) and enter the following:
puts query(<<-QUERY_STRING).to_json
user(<token>) {
id,
is_admin,
full_name as name,
created_at { year, month } as created_year_and_month,
created_at.format("long") as created,
account {
bank_name,
iban,
saldo as saldo_string,
saldo {
currency,
cents /* silly block comment */
}
},
albums.first(2) {
count,
edges {
cursor,
node {
artist,
title,
songs.first(2) {
edges {
id,
title.upcase as upcased_title,
title.upcase.length as upcased_title_length
}
}
}
}
}
}
<token> = "ma" // a variable
QUERY_STRING
This should result in the following JSON (after prettyfication):
{
"id": "ma",
"is_admin": true,
"name": "Martin Andert",
"created_year_and_month": {
"year": 2010,
"month": 3
},
"created": "March 05, 2010 20:14",
"account": {
"bank_name": "Foo Bank",
"iban": "987654321",
"saldo_string": "100000.00 EUR",
"saldo": {
"currency": "EUR",
"cents": 10000000
}
},
"albums": {
"count": 2,
"edges": [
{
"cursor": 1,
"node": {
"artist": "Metallica",
"title": "Black Album",
"songs": {
"edges": [
{
"id": 1,
"upcased_title": "ENTER SANDMAN",
"upcased_title_length": 13
}, {
"id": 2,
"upcased_title": "SAD BUT TRUE",
"upcased_title_length": 12
}
]
}
}
}, {
"cursor": 2,
"node": {
"artist": "Nirvana",
"title": "Nevermind",
"songs": {
"edges": [
{
"id": 5,
"upcased_title": "SMELLS LIKE TEEN SPIRIT",
"upcased_title_length": 23
}, {
"id": 6,
"upcased_title": "COME AS YOU ARE",
"upcased_title_length": 15
}
]
}
}
}
]
}
}
After checking out the repo, run bin/setup
to install dependencies. Then, run bin/console
for an interactive prompt that will allow you to experiment.
bin/setup
to install dependencies.bin/rake test
.git checkout -b my-new-feature
)git commit -am 'add some feature'
)git push origin my-new-feature
)Released under The MIT License.
FAQs
Unknown package
We found that gql demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Hacker Demonstrates How Easy It Is To Steal Data From Popular Password Managers
Security News
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.