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.exports = [ | |
| { insert: 'a man ' }, | |
| { insert: 'a plan', attributes: { italic: true } }, | |
| { insert: ' ' }, | |
| { insert: 'panama', attributes: { bold: true } }, | |
| { insert: '\n' }, | |
| { insert: 'hello', attributes: { italic: true } }, | |
| { insert: ' goodbye\n' }, | |
| { insert: 'bold', attributes: { bold: true } }, | |
| { insert: ' ' }, |
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 FetchEntry($uuid: String!) { | |
| entry(uuid: $uuid) { | |
| body { | |
| components { | |
| type | |
| attributes { | |
| alignment | |
| } | |
| ...ActionboxAttrs | |
| ...BlockquoteAttrs |
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
| { | |
| "MergedSchema": "directive @boundary on OBJECT | FIELD_DEFINITION\ntype Foo @boundary {\n\tid: ID!\n\tgqlgen: Boolean!\n\tnodejs: Boolean!\n}\ntype Query {\n\trandomFoo: Foo!\n}\n", | |
| "Services": [ | |
| { | |
| "Name": "gqlgen", | |
| "ServiceURL": "https://localhost:3000", | |
| }, | |
| { | |
| "Name": "nodejs", | |
| "ServiceURL": "https://localhost:3001", |
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
| { "input": { "handle": "alpha", "descriptionHtml": "alpha", "title": "Alpha" } } | |
| { "input": { "handle": "bravo", "descriptionHtml": "bravo", "title": "Bravo" } } |
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
| interface Node { | |
| id: ID! | |
| } | |
| type Product implements Node { | |
| id: ID! | |
| extensions: ProductExtension | |
| } | |
| type ProductExtension { |
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 GraphQL | |
| class ResponseFixture | |
| SYSTEM_TYPENAME = "__typename__" | |
| SCALAR_VALIDATORS = { | |
| "Boolean" => -> (data) { data.is_a?(TrueClass) || data.is_a?(FalseClass) }, | |
| "Float" => -> (data) { data.is_a?(Numeric) }, | |
| "ID" => -> (data) { data.is_a?(String) || data.is_a?(Integer) }, | |
| "Int" => -> (data) { data.is_a?(Integer) }, | |
| "String" => -> (data) { data.is_a?(String) }, | |
| "JSON" => -> (data) { data.is_a?(Hash) }, |
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
| # DEPTH RESOLVER (receive and return one) | |
| def resolve(object, args, context) | |
| object["item"] | |
| end | |
| # BREADTH RESOLVER (receive and return many) | |
| def resolve(objects, args, context) | |
| objects.map { |object| object["item"] } | |
| end |
OlderNewer