Skip to content

Commit

Permalink
Remove GraphQL endpoints and replace with JSON endpoints.
Browse files Browse the repository at this point in the history
  • Loading branch information
mjkw31 committed Nov 11, 2024
1 parent a3ae5cd commit 865a5c0
Show file tree
Hide file tree
Showing 15 changed files with 412 additions and 575 deletions.
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,6 @@ Run [MkDocs] server to view documentation:
poetry run mkdocs serve
```

To generate a GraphQL schema file:

```
poetry run strawberry export-schema softpack_core.graphql:GraphQL.schema > schema.graphql
```


[pip]: https://pip.pypa.io
[Python installation guide]: http://docs.python-guide.org/en/latest/starting/installation/
Expand Down
48 changes: 2 additions & 46 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ ruamel-yaml = "^0.17.21"
semver = "^3.0.0"
singleton-decorator = "^1.0.0"
sqlalchemy = "1.4.45"
strawberry-graphql = "^0.177.1"
typer = "^0.9.0"
pytest-mock = "^3.11.1"
pytest-asyncio = "^0.21.1"
Expand Down Expand Up @@ -134,7 +133,6 @@ skip_gitignore = true
disallow_untyped_calls = true
disallow_untyped_defs = true
ignore_missing_imports = true
plugins = "strawberry.ext.mypy_plugin"

[tool.pytest.ini_options]
filterwarnings = [
Expand Down
142 changes: 0 additions & 142 deletions schema.graphql

This file was deleted.

11 changes: 4 additions & 7 deletions softpack_core/artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from typing import Iterable, Iterator, List, Optional, Tuple, Union, cast

import pygit2
import strawberry
import yaml
from box import Box
from fastapi import UploadFile
Expand All @@ -25,9 +24,9 @@
from .ldapapi import LDAP


@strawberry.type
@dataclass
class Package(PackageBase):
"""A Strawberry model representing a package."""
"""A data class representing a package."""

version: Optional[str] = None

Expand All @@ -50,15 +49,14 @@ def from_name(cls, name: str) -> 'Package':
return Package(name=name)


@strawberry.type
@dataclass
class Interpreters:
"""A Strawberry model representing the interpreters in an environment."""
"""A data class model representing the interpreters in an environment."""

r: Optional[str] = None
python: Optional[str] = None


@strawberry.enum
class State(Enum):
"""Environment states."""

Expand All @@ -68,7 +66,6 @@ class State(Enum):
waiting = 'waiting'


@strawberry.enum
class Type(Enum):
"""Environment types."""

Expand Down
Loading

0 comments on commit 865a5c0

Please sign in to comment.