Page MenuHomeSoftware Heritage

D7863.id28386.diff
No OneTemporary

D7863.id28386.diff

diff --git a/swh/graphql/resolvers/base_node.py b/swh/graphql/resolvers/base_node.py
--- a/swh/graphql/resolvers/base_node.py
+++ b/swh/graphql/resolvers/base_node.py
@@ -77,5 +77,5 @@
class BaseSWHNode(BaseNode):
@property
- def SWHID(self):
+ def swhid(self):
return self._node.swhid()
diff --git a/swh/graphql/resolvers/content.py b/swh/graphql/resolvers/content.py
--- a/swh/graphql/resolvers/content.py
+++ b/swh/graphql/resolvers/content.py
@@ -34,7 +34,7 @@
When a content is requested directly
with its SWHID
"""
- return self._get_content_by_id(self.kwargs.get("SWHID").object_id)
+ return self._get_content_by_id(self.kwargs.get("swhid").object_id)
class TargetContentNode(BaseContentNode):
diff --git a/swh/graphql/resolvers/directory.py b/swh/graphql/resolvers/directory.py
--- a/swh/graphql/resolvers/directory.py
+++ b/swh/graphql/resolvers/directory.py
@@ -25,7 +25,7 @@
"""
When a directory is requested directly with its SWHID
"""
- directory_id = self.kwargs.get("SWHID").object_id
+ directory_id = self.kwargs.get("swhid").object_id
# path = ""
if archive.Archive().is_directory_available([directory_id]):
return self._get_directory_by_id(directory_id)
@@ -37,7 +37,7 @@
"""
When a directory is requested from a revision
self.obj is revision here
- self.obj.directorySWHID is the required dir SWHID
+ self.obj.directorySWHID is the required directory SWHID
(set from resolvers.revision.py:BaseRevisionNode)
"""
directory_id = self.obj.directorySWHID.object_id
diff --git a/swh/graphql/resolvers/directory_entry.py b/swh/graphql/resolvers/directory_entry.py
--- a/swh/graphql/resolvers/directory_entry.py
+++ b/swh/graphql/resolvers/directory_entry.py
@@ -24,7 +24,7 @@
def _get_paged_result(self):
"""
When entries requested from a directory
- self.obj.SWHID is the directory SWHID here
+ self.obj.swhid is the directory SWHID here
This is not paginated from swh-storgae
using dummy pagination
@@ -34,6 +34,6 @@
# To remove localpagination, just drop the paginated call
# STORAGE-TODO
entries = (
- archive.Archive().get_directory_entries(self.obj.SWHID.object_id).results
+ archive.Archive().get_directory_entries(self.obj.swhid.object_id).results
)
return utils.paginated(entries, self._get_first_arg(), self._get_after_arg())
diff --git a/swh/graphql/resolvers/release.py b/swh/graphql/resolvers/release.py
--- a/swh/graphql/resolvers/release.py
+++ b/swh/graphql/resolvers/release.py
@@ -35,7 +35,7 @@
"""
def _get_node_data(self):
- return self._get_release_by_id(self.kwargs.get("SWHID").object_id)
+ return self._get_release_by_id(self.kwargs.get("swhid").object_id)
class TargetReleaseNode(BaseReleaseNode):
diff --git a/swh/graphql/resolvers/revision.py b/swh/graphql/resolvers/revision.py
--- a/swh/graphql/resolvers/revision.py
+++ b/swh/graphql/resolvers/revision.py
@@ -48,7 +48,7 @@
"""
def _get_node_data(self):
- return self._get_revision_by_id(self.kwargs.get("SWHID").object_id)
+ return self._get_revision_by_id(self.kwargs.get("swhid").object_id)
class TargetRevisionNode(BaseRevisionNode):
@@ -95,7 +95,7 @@
def _get_paged_result(self):
# STORAGE-TODO (date in revisionlog is a dict)
- log = archive.Archive().get_revision_log([self.obj.SWHID.object_id])
+ log = archive.Archive().get_revision_log([self.obj.swhid.object_id])
# FIXME, using dummy(local) pagination, move pagination to backend
# To remove localpagination, just drop the paginated call
# STORAGE-TODO (pagination)
diff --git a/swh/graphql/resolvers/snapshot.py b/swh/graphql/resolvers/snapshot.py
--- a/swh/graphql/resolvers/snapshot.py
+++ b/swh/graphql/resolvers/snapshot.py
@@ -26,7 +26,7 @@
def _get_node_data(self):
""" """
- snapshot_id = self.kwargs.get("SWHID").object_id
+ snapshot_id = self.kwargs.get("swhid").object_id
if archive.Archive().is_snapshot_available([snapshot_id]):
return self._get_snapshot_by_id(snapshot_id)
return None
diff --git a/swh/graphql/resolvers/snapshot_branch.py b/swh/graphql/resolvers/snapshot_branch.py
--- a/swh/graphql/resolvers/snapshot_branch.py
+++ b/swh/graphql/resolvers/snapshot_branch.py
@@ -45,12 +45,12 @@
def _get_paged_result(self):
"""
When branches requested from a snapshot
- self.obj.SWHID is the snapshot SWHID here
+ self.obj.swhid is the snapshot SWHID here
(as returned from resolvers/snapshot.py)
"""
result = archive.Archive().get_snapshot_branches(
- self.obj.SWHID.object_id,
+ self.obj.swhid.object_id,
after=self._get_after_arg(),
first=self._get_first_arg(),
target_types=self.kwargs.get("types"),
diff --git a/swh/graphql/schema/schema.graphql b/swh/graphql/schema/schema.graphql
--- a/swh/graphql/schema/schema.graphql
+++ b/swh/graphql/schema/schema.graphql
@@ -26,7 +26,7 @@
"""
SWHID of the object
"""
- SWHID: SWHID!
+ swhid: SWHID!
}
"""
@@ -336,7 +336,7 @@
"""
SWHID of the snapshot object
"""
- SWHID: SWHID!
+ swhid: SWHID!
"""
Connection to all the snapshot branches
@@ -513,7 +513,7 @@
"""
SWHID of the revision object
"""
- SWHID: SWHID!
+ swhid: SWHID!
"""
Message associated to the revision
@@ -602,7 +602,7 @@
"""
SWHID of the release object
"""
- SWHID: SWHID!
+ swhid: SWHID!
"""
The name of the release
@@ -720,7 +720,7 @@
"""
SWHID of the directory object
"""
- SWHID: SWHID!
+ swhid: SWHID!
"""
Connection to the directory entries
@@ -771,7 +771,7 @@
"""
SWHID of the content object
"""
- SWHID: SWHID!
+ swhid: SWHID!
"""
Checksums for the content
@@ -845,7 +845,7 @@
"""
SWHID of the snapshot object
"""
- SWHID: SWHID!
+ swhid: SWHID!
): Snapshot
"""
@@ -855,7 +855,7 @@
"""
SWHID of the revision object
"""
- SWHID: SWHID!
+ swhid: SWHID!
): Revision
"""
@@ -865,7 +865,7 @@
"""
SWHID of the release object
"""
- SWHID: SWHID!
+ swhid: SWHID!
): Release
"""
@@ -875,7 +875,7 @@
"""
SWHID of the directory object
"""
- SWHID: SWHID!
+ swhid: SWHID!
): Directory
"""
@@ -885,6 +885,6 @@
"""
SWHID of the content object
"""
- SWHID: SWHID!
+ swhid: SWHID!
): Content
}

File Metadata

Mime Type
text/plain
Expires
Thu, Jul 3, 3:38 PM (1 w, 6 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3223460

Event Timeline