You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently profiles can be fetched via simple REST API.
I would like to add new endpoint /graphql/profile (dummy endpoint already exists in file app/api/graphql_endpoint.py. Just a reminder - documentation for the API can be found and tested at http://localhost/docs
Skills
If any one would like to give it a try and write this endpoint you will need to know:
what is graphql - take a look here https://graphql.org/ to get familiar with the idea
I think schema first for graphql should be used therefore we could use ariadne - it is easy to use library with a nice tutorial. If you have different ideas let me know below. I am open to different solutions.
Scope of the task:
We need only fetching of profile data. Modification (mutations) are not allowed for profiles.
Endpoint must be authorized. It it already done in app/api/graphql_endpoint.py. So no need to do it.
Introduction to data retrieval from elastic
There is an object called Entity: app/domain/entity.py
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
GraphQL for profiles
Currently profiles can be fetched via simple REST API.
I would like to add new endpoint /graphql/profile (dummy endpoint already exists in file app/api/graphql_endpoint.py. Just a reminder - documentation for the API can be found and tested at http://localhost/docs
Skills
If any one would like to give it a try and write this endpoint you will need to know:
Scope of the task:
Introduction to data retrieval from elastic
There is an object called Entity: app/domain/entity.py
Entity is any data that has id. Actually Entity is an abstract model for object that can be identified by it. It has method:
With this method you can lead profile entity (record) from connected storage (now it is elastic).
For example loading Profile could look like this
This will load from profile index data and create from it app.domain.Profile object. Data will be verified if it has all required attributes.
Beta Was this translation helpful? Give feedback.
All reactions