-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from simonsobs/dev
Add a GraphQL query `version`
- Loading branch information
Showing
7 changed files
with
49 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
__all__ = ['Plugin'] | ||
__all__ = ['__version__', 'Plugin'] | ||
|
||
|
||
from .__about__ import __version__ | ||
from .plugin import Plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
__all__ = ['Query', 'Mutation', 'Subscription'] | ||
import strawberry | ||
|
||
from .query import Query | ||
|
||
|
||
@strawberry.type | ||
class Mutation: | ||
pass | ||
|
||
|
||
@strawberry.type | ||
class Subscription: | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import strawberry | ||
|
||
import nextline_alert | ||
|
||
|
||
@strawberry.type | ||
class AlertRDB: | ||
version: str = nextline_alert.__version__ | ||
|
||
|
||
@strawberry.type | ||
class Query: | ||
@strawberry.field | ||
async def alert(self) -> AlertRDB: | ||
return AlertRDB() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +0,0 @@ | ||
# SPDX-FileCopyrightText: 2024-present Tai Sakuma <[email protected]> | ||
# | ||
# SPDX-License-Identifier: MIT | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import nextline_alert | ||
|
||
|
||
def test_version(): | ||
'''Confirm that the version string is attached to the module''' | ||
nextline_alert.__version__ |