checking user by phone number:
query {
checkUser(login: "+905115001122") {
username
userExists
status
}
}
checking user by e-mail address:
query {
checkUser(login: "eser@ozvataf.com") {
username
userExists
status
}
}
use previously obtained username to login here:
mutation {
login(username: "34de0e45-e43b-48e7-bfc2-f2d5a4ce5b70", password: "test123") {
isSuccessful
error
details {
tokenType
idToken
accessToken
refreshToken
expiresIn
}
profiles {
id
slug
firstName
lastName
profilePictureUri
}
}
}
check the e-mail afterwards to continue with the signup confirmation:
mutation {
signup(
login: "eser@ozvataf.com",
password: "test123",
firstName: "Eser",
lastName: "Ozvataf",
gender: "MALE",
birthdate: "1984-04-16",
phone: "+905115001122",
profilePictureUri: "https://avatars.githubusercontent.com/u/866558?s=460&u=b22a39f91f830670029edf4a75a4917d167e3477&v=4",
locale: "en-us"
) {
isSuccessful
error
confirmationCode {
attributeName
deliveryMedium
destination
}
username
}
}
use received confirmation code here:
mutation {
signupConfirm(username: "34de0e45-e43b-48e7-bfc2-f2d5a4ce5b70", confirmationCode: "572954") {
isSuccessful
error
}
}
mutation {
resetPassword(username: "34de0e45-e43b-48e7-bfc2-f2d5a4ce5b70") {
isSuccessful
error
}
}
mutation {
resetPasswordConfirm(username: "34de0e45-e43b-48e7-bfc2-f2d5a4ce5b70", confirmationCode: "572954", newPassword: "test456") {
isSuccessful
error
}
}
mutation {
resendConfirmation(username: "34de0e45-e43b-48e7-bfc2-f2d5a4ce5b70") {
isSuccessful
error
}
}
mutation {
changePassword(accessToken: "...", previousPassword: "test456", newPassword: "test789") {
isSuccessful
error
}
}
query {
allProfiles {
edges {
node {
id
slug
role
firstName
lastName
email
phone
profilePictureUri
bio
locationCity
locationCountry
languages {
edges {
node {
isoCode
name
}
}
}
tags {
edges {
node {
slug
name
}
}
}
achievements {
edges {
node {
type
earnedAt
}
}
}
}
}
}
}
query {
profile(id: "UHJvZmlsZU5vZGU6YTA3MjE1NWUtNWUwYi00OWNmLThkNWItYzQ2YjBlN2E4MDAx") {
id
slug
role
firstName
lastName
email
phone
profilePictureUri
bio
locationCity
locationCountry
languages {
edges {
node {
isoCode
name
}
}
}
tags {
edges {
node {
slug
name
}
}
}
achievements {
edges {
node {
type
earnedAt
}
}
}
}
}
query {
profileBySlug(slug: "eser-ozvataf") {
id
slug
role
firstName
lastName
email
phone
profilePictureUri
bio
locationCity
locationCountry
languages {
edges {
node {
isoCode
name
}
}
}
tags {
edges {
node {
slug
name
}
}
}
achievements {
edges {
node {
type
earnedAt
}
}
}
}
}
mutation {
updateProfile(
id: "UHJvZmlsZU5vZGU6YTA3MjE1NWUtNWUwYi00OWNmLThkNWItYzQ2YjBlN2E4MDAx",
firstName: "Eser",
lastName: "Ozvataf",
profilePictureUri: "https://avatars.githubusercontent.com/u/866558?s=460&u=b22a39f91f830670029edf4a75a4917d167e3477&v=4",
bio: "Morbi in hendrerit augue. Proin tincidunt ligula libero, efficitur imperdiet eros lacinia ac. Vivamus metus nunc, fermentumas."
) {
id
firstName
lastName
profilePictureUri
bio
}
}
mutation {
updateProfile(
id: "UHJvZmlsZU5vZGU6YTA3MjE1NWUtNWUwYi00OWNmLThkNWItYzQ2YjBlN2E4MDAx",
bio: "Morbi in hendrerit augue. Proin tincidunt ligula libero, efficitur imperdiet eros lacinia ac. Vivamus metus nunc, fermentumas."
) {
id
bio
}
}
echo "\033[1;33mInstalling dependencies... \033[0m"
pipenv install --dev --pre
echo "\033[1;33mApplying migrations... \033[0m"
python manage.py migrate
echo "\033[1;33mSeeding initial data... \033[0m"
python manage.py loaddata ./app/common/fixtures/initial_data.yaml
python manage.py loaddata ./app/profiles/fixtures/initial_data.yaml
python manage.py loaddata ./app/certificates/fixtures/initial_data.yaml
you may need these instructions during development, but don't execute them unless you know what these mean
IMPORTANT: recreation of database is needed afterwards
echo "\033[1;33mDumping existing initial data... \033[0m"
APP_NAMES=`python manage.py app_list`
for app in ${APP_NAMES[*]}
do
echo "...executing $app"
python manage.py dumpdata --format yaml --indent 2 "$app" > "app/$app/fixtures/initial_data.yaml"
done
echo "\033[1;33mRecreating migrations... \033[0m"
for app in ${APP_NAMES[*]}
do
echo "...deleting migrations of $app"
rm "app/$app/migrations/0*.py"
done
echo "...creating"
python manage.py makemigrations
docker build . -t acikkaynak-service:0001 -t __id__.dkr.ecr.eu-west-1.amazonaws.com/acikkaynak-service:0001
aws ecr get-login-password --region eu-west-1 | docker login --username AWS --password-stdin __id__.dkr.ecr.eu-west-1.amazonaws.com
docker push __id__.dkr.ecr.eu-west-1.amazonaws.com/acikkaynak-service
aws ecs update-service --cluster acikkaynak-service --service custom-service --force-new-deployment