Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add version field to app

Maciej Korycinski4c608f86deb1
diff --git a/saleor/app/migrations/0002_auto_20200507_0514.py b/saleor/app/migrations/0002_auto_20200507_0517.py
similarity index 94%
rename from saleor/app/migrations/0002_auto_20200507_0514.py
rename to saleor/app/migrations/0002_auto_20200507_0517.py
index d889cdd7bc..b98fd4d919 100644
--- a/saleor/app/migrations/0002_auto_20200507_0514.py
+++ b/saleor/app/migrations/0002_auto_20200507_0517.py
@@ -1,4 +1,4 @@
-# Generated by Django 3.0.5 on 2020-05-07 10:14
+# Generated by Django 3.0.5 on 2020-05-07 10:17
from django.db import migrations, models
@@ -50,6 +50,11 @@ class Migration(migrations.Migration):
max_length=60,
),
),
+ migrations.AddField(
+ model_name="app",
+ name="version",
+ field=models.CharField(blank=True, max_length=60),
+ ),
migrations.CreateModel(
name="AppJob",
fields=[
diff --git a/saleor/app/models.py b/saleor/app/models.py
index 046afcc890..e88ba3c45c 100644
--- a/saleor/app/models.py
+++ b/saleor/app/models.py
@@ -31,6 +31,7 @@ class App(ModelWithMetadata):
support_url = models.URLField(blank=True)
configuration_url = models.URLField(blank=True)
app_url = models.URLField(blank=True)
+ version = models.CharField(max_length=60, blank=True)
class Meta:
ordering = ("name", "pk")
diff --git a/saleor/graphql/app/types.py b/saleor/graphql/app/types.py
index 349b352f09..3a3f078394 100644
--- a/saleor/graphql/app/types.py
+++ b/saleor/graphql/app/types.py
@@ -61,6 +61,7 @@ class App(CountableDjangoObjectType):
description="Url to iframe with the configuration for the app."
)
app_url = graphene.String(description="Url to iframe with the app.")
+ version = graphene.String(description="Version number of the app.")
class Meta:
description = "Represents app data."
diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphql
index 341703af30..740cd52cdc 100644
--- a/saleor/graphql/schema.graphql
+++ b/saleor/graphql/schema.graphql
@@ -210,6 +210,7 @@ type App implements Node & ObjectWithMetadata {
supportUrl: String
configurationUrl: String
appUrl: String
+ version: String
}
type AppCountableConnection {