I hereby claim:
- I am valikos on github.
- I am valikos (https://keybase.io/valikos) on keybase.
- I have a public key ASAFNgo1ArmpXEgWEJQ-tNZoNNTOO19jKthlz549Xnc_Ngo
To claim this, I am signing this object:
# (I recommend understanding the basics of this first: http://sequel.jeremyevans.net/rdoc/files/doc/object_model_rdoc.html) | |
# Extending the underlying dataset (http://sequel.jeremyevans.net/rdoc/files/README_rdoc.html#label-Extending+the+underlying+dataset) | |
# The recommended way to implement table-wide logic by defining methods on the dataset using dataset_module: | |
class Post < Sequel::Model | |
dataset_module do | |
def posts_with_few_comments | |
where{num_comments < 30} |
I hereby claim:
To claim this, I am signing this object:
url = 'https://raw.githubusercontent.com/Fyrd/caniuse/master/data.json' | |
res = Faraday.get(url) |
require "test_prof/recipes/rspec/let_it_be" | |
describe BeatleWeightedSearchQuery do | |
let!(:paul) { create(:beatle, name: "Paul") } | |
let!(:ringo) { create(:beatle, name: "Ringo") } | |
let!(:george) { create(:beatle, name: "George") } | |
let!(:john) { create(:beatle, name: "John") } | |
specify { expect(subject.call("john")).to contain_exactly(john) } |
{ | |
"data": { | |
"me": { | |
"firstName": "Valentyn", | |
"lastName": "Ostakh", | |
"company": "RubyGarage", | |
"position": "Ruby/JS developer", | |
"socialLinks": [ | |
{ | |
"name": "facebook", |
query { | |
me { | |
firstName | |
lastName | |
company | |
position | |
socialLinks { | |
name | |
url | |
} |
class MySchema < GraphQL::Schema | |
# Required: | |
query Types::Query | |
# Optional: | |
mutation Types::Mutation | |
subscription Types::Subscription | |
end | |
# app/graphql/types/query_type.rb | |
class Types::QueryType < GraphQL::Schema::Object |
schema { | |
query: Query | |
mutation: Mutation | |
} | |
type Query { | |
character(id: ID!): CharacterType | |
} | |
schema { |
class Directives::Camelize < GraphQL::Schema::Directive | |
description "..." | |
locations( | |
GraphQL::Schema::Directive::FIELD, | |
GraphQL::Schema::Directive::FRAGMENT_SPREAD, | |
GraphQL::Schema::Directive::INLINE_FRAGMENT | |
) | |
argument :if, Boolean, required: true, description: "..." |
module Types::Interfaces::Node | |
include Types::BaseInterface | |
field :id, ID, null: false | |
end | |
module Types::Interfaces::Person | |
include Types::BaseInterface | |
field :first_name, String, null: false |