https://github.com/graphql-python/graphene-django/issues/349 http://docs.graphene-python.org/projects/django/en/latest/tutorial-relay/
这将查询所有成分,然后使用上一个查询获取特定成分。这是Relay / Graphene中的正常设计模式,还是可以在1个查询中完成?
query {
allIngredients {
edges {
node {
id,
name
}
}
}
}
query {
# Graphene creates globally unique IDs for all objects.
# You may need to copy this value from the results of the first query
ingredient(id: "SW5ncmVkaWVudE5vZGU6MQ==") {
name
}
}