-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add graphql (#3632) * feat: add GraphQL support with schema and queries for articles, blogs, and reports * feat: extend GraphQL schema to include Launch and Event types with new queries for articles and blogs by news site, launch, and event * refactor: remove logging configuration from settings.py * feat: add NewsSite type to GraphQL schema and fix typo in LaunchType fields * feat: implement GraphQL types and queries for Article, Blog, Report, Launch, Event, and NewsSite * feat: update GraphQL types to use custom filter classes for Article, Blog, and Report * feat: enhance article and blog queries with ordering by published date * fix: remove ordering from all_articles query in GraphQL schema * chore: sync pyproject * chore: ignore type beceause it's not available * build: 4.17.0-rc.1 Automatically generated by python-semantic-release * chore: update harvester to 0.10.0 * fix: update commit message format for semantic release * build: 4.17.0-rc.2 Automatically generated by python-semantic-release * chore: remove unused pika-stubs * feat: generate the label dynamically * feat(#3630): add django admin dark theme (#3633) * feat(#3630): django admin dark theme * fix: update STATIC_ROOT and add STATICFILES_DIRS for improved static file handling --------- Co-authored-by: Derk Weijers <[email protected]> * chore: package updates --------- Co-authored-by: semantic-release <semantic-release> Co-authored-by: Arnaud Muller <[email protected]>
- Loading branch information
1 parent
eb57250
commit b036b8a
Showing
21 changed files
with
17,431 additions
and
166 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,6 +1,6 @@ | ||
[project] | ||
name = "snapy" | ||
version = "4" | ||
version = "4.17.0-rc.2" | ||
description = "Spaceflight News API (SNAPI) enables developers to add the latest spaceflight news to their apps." | ||
authors = [{ name = "Derk Weijers", email = "[email protected]" }] | ||
readme = "README.md" | ||
|
@@ -26,7 +26,8 @@ dependencies = [ | |
"pyyaml>=6.0.2", | ||
"sentry-sdk>=2.14.0", | ||
"uritemplate>=4.1.1", | ||
"harvester>=0.9.0", | ||
"harvester>=0.10.0", | ||
"graphene-django>=3.2.2", | ||
] | ||
|
||
[tool.uv] | ||
|
@@ -37,7 +38,6 @@ dev-dependencies = [ | |
"django-filter-stubs>=0.1.3", | ||
"djangorestframework-stubs[compatible-mypy]>=3.14.0,<3.15.0", | ||
"mypy>=1.7.0,<1.8.0", | ||
"pika-stubs>=0.1.3", | ||
"pytest>=8.3.3", | ||
"pytest-codspeed>=2.2.1", | ||
"pytest-cov>=5.0.0", | ||
|
@@ -91,7 +91,7 @@ update_changelog_on_bump = false | |
|
||
[tool.semantic_release] | ||
assets = [] | ||
commit_message = "{version}\n\nAutomatically generated by python-semantic-release" | ||
commit_message = "build: {version}\n\nAutomatically generated by python-semantic-release" | ||
commit_parser = "angular" | ||
logging_use_named_masks = false | ||
major_on_zero = true | ||
|
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,61 @@ | ||
# type: ignore | ||
|
||
from graphene import ObjectType, relay | ||
from graphene_django import DjangoObjectType | ||
from graphene_django.filter import DjangoFilterConnectionField | ||
|
||
from api.models import Article, Blog, Event, Launch, NewsSite, Report | ||
from api.views.filters import BaseFilter, DocsFilter | ||
|
||
|
||
class ArticleType(DjangoObjectType): | ||
class Meta: | ||
model = Article | ||
exclude = ["is_deleted"] | ||
filterset_class = DocsFilter | ||
interfaces = (relay.Node,) | ||
|
||
|
||
class BlogType(DjangoObjectType): | ||
class Meta: | ||
model = Blog | ||
exclude = ["is_deleted"] | ||
filterset_class = DocsFilter | ||
interfaces = (relay.Node,) | ||
|
||
|
||
class ReportType(DjangoObjectType): | ||
class Meta: | ||
model = Report | ||
exclude = ["is_deleted"] | ||
filterset_class = BaseFilter | ||
interfaces = (relay.Node,) | ||
|
||
|
||
class LaunchType(DjangoObjectType): | ||
class Meta: | ||
model = Launch | ||
interfaces = (relay.Node,) | ||
|
||
|
||
class EventType(DjangoObjectType): | ||
class Meta: | ||
model = Event | ||
interfaces = (relay.Node,) | ||
|
||
|
||
class NewsSiteType(DjangoObjectType): | ||
class Meta: | ||
model = NewsSite | ||
interfaces = (relay.Node,) | ||
|
||
|
||
class Query(ObjectType): | ||
article = relay.Node.Field(ArticleType) | ||
all_articles = DjangoFilterConnectionField(ArticleType) | ||
|
||
blog = relay.Node.Field(BlogType) | ||
all_blogs = DjangoFilterConnectionField(BlogType) | ||
|
||
report = relay.Node.Field(ReportType) | ||
all_reports = DjangoFilterConnectionField(ReportType) |
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
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
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
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
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,12 @@ | ||
# type: ignore | ||
|
||
from graphene import ObjectType, Schema | ||
|
||
from api.schema import Query as ApiQuery | ||
|
||
|
||
class Query(ApiQuery, ObjectType): | ||
pass | ||
|
||
|
||
schema = Schema(query=Query) |
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
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
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,3 @@ | ||
/* | ||
* These theme uses default variables at ../_variables.scss | ||
*/ |
Oops, something went wrong.