Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iric-data
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bioinfo_iric
iric-data
Commits
a624539e
Commit
a624539e
authored
2 years ago
by
Albert Feghaly
Browse files
Options
Downloads
Patches
Plain Diff
Add my_profile graphql query field
parent
734eb75c
No related branches found
No related tags found
2 merge requests
!106
Dev
,
!104
Resolve "Need an option for Profiles to only return user info"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
portal/graphql_schema.py
+11
-1
11 additions, 1 deletion
portal/graphql_schema.py
with
11 additions
and
1 deletion
portal/graphql_schema.py
+
11
−
1
View file @
a624539e
...
...
@@ -89,11 +89,18 @@ class Query(graphene.ObjectType):
in_id_list
=
graphene
.
List
(
graphene
.
String
)
)
datasets
=
graphene
.
List
(
DataSetType
,
in_id_list
=
graphene
.
List
(
graphene
.
String
))
lab
=
graphene
.
Field
(
LabType
,
name
=
graphene
.
String
(),
dbid
=
graphene
.
ID
())
lab
=
graphene
.
Field
(
LabType
,
name
=
graphene
.
String
(),
dbid
=
graphene
.
ID
()
)
labs
=
graphene
.
List
(
LabType
,
in_name_list
=
graphene
.
List
(
graphene
.
String
)
)
my_profile
=
graphene
.
Field
(
ProfileType
)
profiles
=
graphene
.
List
(
ProfileType
,
in_email_list
=
graphene
.
List
(
graphene
.
String
)
...
...
@@ -190,6 +197,9 @@ class Query(graphene.ObjectType):
return
qs
.
distinct
()
def
resolve_my_profile
(
self
,
info
,
**
kwargs
):
return
Profile
.
objects
.
get
(
user__email
=
info
.
context
.
user
.
email
)
def
resolve_profiles
(
self
,
info
,
**
kwargs
):
email_list
=
kwargs
.
get
(
'
in_email_list
'
)
qs
=
Profile
.
objects
.
all
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment