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 FooForm < Dry::Struct | |
constructor_type(:schema) | |
module Types | |
include Dry::Types.module | |
end | |
attribute :title, Types::Coercible::String | |
attribute :location, Types::Coercible::String | |
attribute :description, Types::Coercible::String |
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
{ | |
“data”: { | |
"user" : { | |
“id”: “3” | |
"name": “Chewbacca", | |
} | |
} | |
} |
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
mutation { | |
user: createUser(name: “Chewbacca”) { | |
id, | |
name | |
} | |
} |
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 { | |
user(id: 123) { | |
name | |
} | |
} |
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
{ | |
__schema { | |
types { | |
kind | |
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
{ | |
user(id: 123) { | |
name, | |
profilePicture(size: 200) { | |
width, | |
height, | |
url | |
} | |
} | |
} |
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
type Query { | |
user: User | |
user(id: Int): User | |
} | |
type User { | |
name: String | |
profilePicture(size: Int = 50): ProfilePicture | |
} |
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
{ | |
"data": { | |
"user" : { | |
"name": "Luke Skywalker", | |
"friends": [ | |
{ name: "Han Solo" }, | |
{ name: "Leia Organa" } | |
] | |
} | |
} |
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
{ | |
user(id: 123) { | |
name, | |
friends { | |
name | |
} | |
} | |
} |
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 ActiveRecord::ConnectionAdapters::Mysql2Adapter | |
NATIVE_DATABASE_TYPES[:primary_key] = "int(11) auto_increment PRIMARY KEY" | |
end |
NewerOlder