Last active
October 12, 2018 12:59
-
-
Save e0ipso/4c55187270b5b75cca7229762cca235d to your computer and use it in GitHub Desktop.
Example schema with auto-resolvers from OpenAPI definitions
This file contains 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 Recipe { | |
id: String! | |
title: String! | |
author: User! | |
} | |
type User { | |
id: String! | |
name: String! | |
recipes: [Recipe] | |
} | |
type Query { | |
recipesByAuthor(authorName: String!): [Recipe] @fromJsonApi('/recipes?filter[author.name]={authorName}&include=author') | |
articlesByAuthor(authorName: String!): [Article] @fromJsonApi('/articles?filter[owner.name]={authorName}&include=owner') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment