Skip to content
Snippets Groups Projects
Commit 1c40b051 authored by jan.bednarik's avatar jan.bednarik
Browse files

Add name collision id to Author and User types.

parent 62235959
No related branches found
No related tags found
No related merge requests found
......@@ -87,6 +87,7 @@ class User(graphene.ObjectType):
openid_uid = graphene.String()
first_name = graphene.String()
last_name = graphene.String()
name_collision_id = graphene.Int()
email = graphene.String()
is_author = graphene.Boolean()
extra = JSONString()
......@@ -101,6 +102,7 @@ class User(graphene.ObjectType):
openid_uid=user.openid_uid,
first_name=user.first_name,
last_name=user.last_name,
name_collision_id=user.name_collision_id,
email=user.email,
is_author=user.is_author,
extra=user.extra,
......@@ -118,6 +120,7 @@ class User(graphene.ObjectType):
class Author(graphene.ObjectType):
first_name = graphene.String()
last_name = graphene.String()
name_collision_id = graphene.Int()
total_reports = graphene.Int()
extra = JSONString()
reports = relay.ConnectionField(ReportConnection)
......@@ -131,6 +134,7 @@ class Author(graphene.ObjectType):
id=user.id,
first_name=user.first_name,
last_name=user.last_name,
name_collision_id=user.name_collision_id,
extra=user.extra,
total_reports=user.total_reports,
)
......
......@@ -18,6 +18,7 @@ snapshots['test_all 1'] = {
'firstName': 'Shaun',
'id': 'QXV0aG9yOjM=',
'lastName': 'Sheep',
'nameCollisionId': 0,
'totalReports': 0
}
},
......@@ -28,6 +29,7 @@ snapshots['test_all 1'] = {
'firstName': 'Spongebob',
'id': 'QXV0aG9yOjI=',
'lastName': 'Squarepants',
'nameCollisionId': 0,
'totalReports': 0
}
},
......@@ -38,6 +40,7 @@ snapshots['test_all 1'] = {
'firstName': 'Winston',
'id': 'QXV0aG9yOjE=',
'lastName': 'Wolfe',
'nameCollisionId': 0,
'totalReports': 0
}
}
......@@ -64,6 +67,7 @@ snapshots['test_first 1'] = {
'firstName': 'Shaun',
'id': 'QXV0aG9yOjM=',
'lastName': 'Sheep',
'nameCollisionId': 0,
'totalReports': 0
}
},
......@@ -74,6 +78,7 @@ snapshots['test_first 1'] = {
'firstName': 'Spongebob',
'id': 'QXV0aG9yOjI=',
'lastName': 'Squarepants',
'nameCollisionId': 0,
'totalReports': 0
}
}
......@@ -100,6 +105,7 @@ snapshots['test_first_after 1'] = {
'firstName': 'Spongebob',
'id': 'QXV0aG9yOjI=',
'lastName': 'Squarepants',
'nameCollisionId': 0,
'totalReports': 0
}
}
......@@ -143,6 +149,7 @@ snapshots['test_last_before 1'] = {
'firstName': 'Spongebob',
'id': 'QXV0aG9yOjI=',
'lastName': 'Squarepants',
'nameCollisionId': 0,
'totalReports': 0
}
}
......@@ -168,6 +175,7 @@ snapshots['test_with_reports 1'] = {
'firstName': 'Winston',
'id': 'QXV0aG9yOjE=',
'lastName': 'Wolfe',
'nameCollisionId': 0,
'reports': {
'edges': [
{
......
......@@ -23,6 +23,7 @@ snapshots['test_author 1'] = {
'firstName': 'Winston',
'id': 'QXV0aG9yOjU=',
'lastName': 'Wolfe',
'nameCollisionId': 0,
'totalReports': 0
}
}
......@@ -42,6 +43,7 @@ snapshots['test_report 1'] = {
'firstName': 'Winston',
'id': 'QXV0aG9yOjE=',
'lastName': 'Wolfe',
'nameCollisionId': 0,
'totalReports': 1
},
'body': 'Long story short: we got the Ring!',
......@@ -78,6 +80,7 @@ snapshots['test_user 1'] = {
'id': 'VXNlcjo4',
'isAuthor': False,
'lastName': 'Einstein',
'nameCollisionId': 0,
'openidUid': 'albert@einstein.id'
}
}
......
......@@ -19,6 +19,7 @@ snapshots['test_all 1'] = {
'firstName': 'Spongebob',
'id': 'QXV0aG9yOjI=',
'lastName': 'Squarepants',
'nameCollisionId': 0,
'totalReports': 1
},
'body': 'Another long story.',
......@@ -41,6 +42,7 @@ snapshots['test_all 1'] = {
'firstName': 'Winston',
'id': 'QXV0aG9yOjE=',
'lastName': 'Wolfe',
'nameCollisionId': 0,
'totalReports': 2
},
'body': 'Aragorn is the King. And we have lost the Ring.',
......@@ -63,6 +65,7 @@ snapshots['test_all 1'] = {
'firstName': 'Winston',
'id': 'QXV0aG9yOjE=',
'lastName': 'Wolfe',
'nameCollisionId': 0,
'totalReports': 2
},
'body': 'Long story short: we got the Ring!',
......@@ -101,6 +104,7 @@ snapshots['test_query 1'] = {
'firstName': 'Spongebob',
'id': 'QXV0aG9yOjI=',
'lastName': 'Squarepants',
'nameCollisionId': 0,
'totalReports': 1
},
'body': 'Another long story.',
......@@ -133,6 +137,7 @@ snapshots['test_highlight 1'] = {
'firstName': 'Winston',
'id': 'QXV0aG9yOjE=',
'lastName': 'Wolfe',
'nameCollisionId': 0,
'totalReports': 2
},
'body': 'Aragorn is the King. And we have lost the <mark>Ring</mark>.',
......@@ -155,6 +160,7 @@ snapshots['test_highlight 1'] = {
'firstName': 'Winston',
'id': 'QXV0aG9yOjE=',
'lastName': 'Wolfe',
'nameCollisionId': 0,
'totalReports': 2
},
'body': 'Long story short: we got the <mark>Ring</mark>!',
......
......@@ -22,6 +22,7 @@ snapshots['test_authenticated 1'] = {
'id': 'VXNlcjox',
'isAuthor': True,
'lastName': 'Wolfe',
'nameCollisionId': 0,
'openidUid': 'TheWolf'
}
}
......
......@@ -21,6 +21,7 @@ def test_all(client, snapshot):
id
firstName
lastName
nameCollisionId
totalReports
extra
}
......@@ -49,6 +50,7 @@ def test_first(client, snapshot):
id
firstName
lastName
nameCollisionId
totalReports
extra
}
......@@ -77,6 +79,7 @@ def test_first_after(client, snapshot):
id
firstName
lastName
nameCollisionId
totalReports
extra
}
......@@ -105,6 +108,7 @@ def test_last(client, snapshot):
id
firstName
lastName
nameCollisionId
totalReports
extra
}
......@@ -133,6 +137,7 @@ def test_last_before(client, snapshot):
id
firstName
lastName
nameCollisionId
totalReports
extra
}
......@@ -159,6 +164,7 @@ def test_with_reports(client, snapshot):
id
firstName
lastName
nameCollisionId
totalReports
extra
reports {
......
......@@ -41,6 +41,7 @@ def test_author(client, snapshot):
id
firstName
lastName
nameCollisionId
totalReports
extra
}}
......@@ -84,6 +85,7 @@ def test_report(client, snapshot):
id
firstName
lastName
nameCollisionId
totalReports
extra
}}
......@@ -104,6 +106,7 @@ def test_user__unauthorized(client, snapshot):
id
firstName
lastName
nameCollisionId
openidUid
isAuthor
extra
......@@ -127,6 +130,7 @@ def test_user__not_a_viewer(client, snapshot):
id
firstName
lastName
nameCollisionId
openidUid
isAuthor
extra
......@@ -148,6 +152,7 @@ def test_user(client, snapshot):
id
firstName
lastName
nameCollisionId
openidUid
isAuthor
extra
......
......@@ -29,6 +29,7 @@ def test_all(client, snapshot):
id
firstName
lastName
nameCollisionId
totalReports
extra
}
......@@ -69,6 +70,7 @@ def test_query(client, snapshot):
id
firstName
lastName
nameCollisionId
totalReports
extra
}
......@@ -103,6 +105,7 @@ def test_highlight(client, snapshot):
id
firstName
lastName
nameCollisionId
totalReports
extra
}
......
......@@ -34,6 +34,7 @@ def test_authenticated(client, snapshot):
id
firstName
lastName
nameCollisionId
email
openidUid
isAuthor
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment