Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9125596
origin.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
469 B
Subscribers
None
origin.py
View Options
from
ariadne
import
ObjectType
from
.
import
query
from
swh.graphql.backends
import
archive
origin
=
ObjectType
(
"Origin"
)
@query.field
(
"origin"
)
def
resolve_origin
(
_
,
info
,
url
):
"""
"""
origin
=
archive
.
get_origins
()
return
origin
[
0
]
@origin.field
(
"url"
)
def
url
(
origin
,
info
):
"""
"""
# return origin.url
return
origin
[
"url"
]
@origin.field
(
"visits"
)
def
visits
(
origin
,
info
):
"""
"""
return
[{
"status"
:
"success"
}]
File Metadata
Details
Attached
Mime Type
text/x-python
Expires
Sat, Jun 21, 9:05 PM (4 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3297936
Attached To
rDGQL GraphQL API
Event Timeline
Log In to Comment