Changeset View
Changeset View
Standalone View
Standalone View
swh/graphql/resolvers/resolvers.py
# Copyright (C) 2022 The Software Heritage developers | |||||
# See the AUTHORS file at the top-level directory of this distribution | |||||
# License: GNU General Public License version 3, or any later version | |||||
# See top-level LICENSE file for more information | |||||
""" | """ | ||||
High level resolvers | High level resolvers | ||||
Any schema attribute can be resolved by any of the following ways | Any schema attribute can be resolved by any of the following ways | ||||
and in the following priority order | and in the following priority order | ||||
- In this module using an annotation (eg: @visitstatus.field("snapshot")) | - In this module using an annotation (eg: @visitstatus.field("snapshot")) | ||||
- As a property in the Node object (eg: resolvers.visit.OriginVisitNode.id) | - As a property in the Node object (eg: resolvers.visit.OriginVisitNode.id) | ||||
- As an attribute/item in the object/dict returned by the backend (eg: Origin.url) | - As an attribute/item in the object/dict returned by the backend (eg: Origin.url) | ||||
""" | """ | ||||
▲ Show 20 Lines • Show All 232 Lines • Show Last 20 Lines |