Skip to content

Commit

Permalink
Merge pull request #21 from scaife-viewer/fix/token-alignments-variables
Browse files Browse the repository at this point in the history
Support resolving alignmentUrn via GraphQL variables
  • Loading branch information
jacobwegner authored Sep 29, 2020
2 parents cf1a5a9 + 43132d2 commit 2ee5045
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions atlas/scaife_viewer/atlas/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,10 @@ class Meta:

def get_alignment_urn(self, info):
NAME_ALIGNMENT_URN = "alignment_Urn"
aligmment_urn = info.variable_values.get("alignmentUrn")
if aligmment_urn:
return aligmment_urn

for selection in info.operation.selection_set.selections:
for argument in selection.arguments:
if argument.name.value == NAME_ALIGNMENT_URN:
Expand Down
2 changes: 1 addition & 1 deletion atlas/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
author_email="[email protected]",
description="Aligned Text and Linguistic Annotation Server (ATLAS)",
name="scaife-viewer-atlas",
version="0.1a5",
version="0.1a6",
url="http://github.com/scaife-viewer/backend/",
license="MIT",
packages=find_packages(),
Expand Down

0 comments on commit 2ee5045

Please sign in to comment.