This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User::Create < Micro::Case | |
attributes :name, :age | |
def call! | |
return invalid_user unless valid? | |
if User.create(name: name, age: age) | |
Success | |
else | |
Failure |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Feedbacks: | |
#Remover os níveis extras i.e. | |
Micro::Case.config do |config| | |
config.enable_activemodel_validations = true | |
config.disable_transitions = true | |
config.disable_the_use_case_access_when_success = true | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query LearnAboutSchema { | |
__schema { | |
types { | |
name | |
kind | |
} | |
queryType { | |
fields { | |
name | |
description |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query LearnAboutSchema { | |
__schema { | |
types { | |
name | |
kind | |
} | |
queryType { | |
fields { | |
name | |
description |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
version: 2.1 | |
aliases: | |
- &install_yarn_dependencies | |
run: | |
name: Install yarn dependencies | |
command: yarn install --frozen-lockfile --ignore-engines | |
- &update_yarn | |
run: | |
name: Update yarn |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# gruvbox-dark colorscheme for kitty | |
# snazzy theme used as base | |
foreground #ebdbb2 | |
background #272727 | |
selection_foreground #655b53 | |
selection_background #ebdbb2 | |
url_color #d65c0d | |
# black |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
time="2017-10-26T14:24:42-02:00" level=debug msg="Got to backend... about to start query" | |
Started POST "/graphql" for ::1 at 2017-10-26 14:24:42 -0200 | |
Processing by GraphqlController#execute as */* | |
Parameters: {"query"=>"query{organization(id:\"1\"){name}}", "variables"=>{"input"=>{"duration"=>"1h", "imageUrl"=>"google.com", "location"=>"Jedi", "points"=>50, "startedAt"=>"2017-05-12", "title"=>"Woot"}, "organizationId"=>"1"}, "operationName"=>"", "extensions"=>nil, "graphql"=>{"query"=>"query{organization(id:\"1\"){name}}", "variables"=>{"input"=>{"duration"=>"1h", "imageUrl"=>"google.com", "location"=>"Jedi", "points"=>50, "startedAt"=>"2017-05-12", "title"=>"Woot"}, "organizationId"=>"1"}, "operationName"=>"", "extensions"=>nil}} | |
User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]] | |
Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.3ms) | |
time="2017-10-26T14:24:42-02:00" level=debug msg="Capturing trace." bucket=93 isError=true signature="que |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ImplicitResolverInstrumentation | |
def instrument(_type, field) | |
implicit_resolver = "Resolvers::#{field.name.camelize}".safe_constantize | |
if implicit_resolver && default_or_connection_resolver?(field) | |
field.redefine do | |
resolve implicit_resolver | |
end | |
else | |
field |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Resolvers | |
class CreateEvent | |
include Pundit | |
def self.call(*args) | |
new(*args).resolve | |
end | |
attr_reader :current_user |