-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.graphql
More file actions
53 lines (48 loc) · 1.5 KB
/
Copy pathschema.graphql
File metadata and controls
53 lines (48 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
extend schema
@link(url: "https://specs.apollo.dev/federation/v2.3", import: ["@key"])
type Query {
"Returns a randomly selected recipe from our database"
randomRecipe: Recipe
"Returns all recipes available in our database"
allRecipes: [Recipe]
"Returns a specific recipe based on its ID"
recipe(id: ID!): Recipe
"The most recently added recipes from our database"
recentlyAddedRecipes: [Recipe]
}
type Recipe {
id: ID!
"The name of the recipe"
name: String
"An interesting and fun description of the recipe"
description: String
"How much time it takes to prep the ingredients, in minutes"
prepTime: Float @deprecated(reason: "Use consolidated readyTime")
"How much time it takes in total to prep and cook the recipe, in minutes"
readyTime: Float
"How many servings this recipe makes"
servings: Int
"An ordered list of instructions to create the recipe. The array is ordered, do not mess with the order."
instructions: [String]
"A list of ingredients the recipe calls for"
ingredients: [Ingredient]
"A list of recipes that is related to this particular one, for discoverability"
relatedRecipes: [Recipe]
"List of cookware used in the recipe"
cookware: [Cookware]
}
type Cookware @key(fields: "name", resolvable: false) {
name: String!
}
type Ingredient {
id: ID!
"Display text for the ingredient"
text: String
"The name of an ingredient"
name: String
"A potential substitute for the ingredient, if available"
substitute: String
}
type Chef {
FirstName: String
}