Skip to content

Instantly share code, notes, and snippets.

@alyssoncm
alyssoncm / mutationLogOut.gql
Created September 23, 2019 20:43
Mutation Log out
mutation logOutUser{
users{
logOut
}
}
@alyssoncm
alyssoncm / mutationLogin.gql
Created September 23, 2019 20:42
User Login Mutation
mutation logInUser($username: String!, $password: String!){
users{
logIn(username: $username, password: $password){
sessionToken
}
}
}
@alyssoncm
alyssoncm / mutation.gql
Created September 23, 2019 20:38
mutatio
mutation signUpUser($username: String!, $password: String!, $email: String) {
users {
signUp(
fields: { username: $username, password: $password, email: $email }
) {
objectId
}
}
}
@alyssoncm
alyssoncm / fullProfileView
Created September 18, 2019 17:35
fullProfileView
import SwiftUI
struct ProfileView: View {
var body: some View {
GeometryReader { geometry in
VStack(alignment: .leading){
HStack{
Text("username")
.foregroundColor(lightBlueColor)
.fontWeight(.semibold)
@alyssoncm
alyssoncm / bottonView
Created September 18, 2019 17:33
bottonView
struct BottomView: View {
var body: some View {
HStack{
Button(action: {}){
Image("home")
.resizable()
.frame(width: 30, height: 30)
}.padding()
Spacer()
@alyssoncm
alyssoncm / timeline
Created September 18, 2019 17:32
Timeline
struct TimelineView: View {
let previews:[Preview] = [
Preview(id: 0, imageUrl: "1"),
Preview(id: 1, imageUrl: "2"),
Preview(id: 2, imageUrl: "3"),
Preview(id: 3, imageUrl: "4"),
Preview(id: 4, imageUrl: "5"),
Preview(id: 5, imageUrl: "6"),
Preview(id: 6, imageUrl: "7"),
@alyssoncm
alyssoncm / vstack4
Created September 18, 2019 17:30
VStack4
struct ProfileView: View {
var body: some View {
GeometryReader { geometry in
VStack(alignment: .leading){
HStack{
Text("username")
.foregroundColor(lightBlueColor)
.fontWeight(.semibold)
.padding(.leading, 10)
@alyssoncm
alyssoncm / HStack4
Created September 18, 2019 17:29
HStack4
struct ProfileView: View {
var body: some View {
GeometryReader { geometry in
VStack(alignment: .leading){
HStack{
Text("username")
.foregroundColor(lightBlueColor)
.fontWeight(.semibold)
.padding(.leading, 10)
@alyssoncm
alyssoncm / HStack3
Created September 18, 2019 17:28
HStack3
HStack{
VStack{
Image("logo-social")
.resizable()
.frame(width: 90, height: 90)
.clipShape(Circle())
.shadow(radius: 3)
.overlay(Circle().stroke(Color.pink, lineWidth: 1))
Text("Your Name")
@alyssoncm
alyssoncm / fullCode
Created September 18, 2019 17:28
fullCode
struct ProfileView: View {
var body: some View {
GeometryReader { geometry in
VStack(alignment: .leading){
HStack{
Text("username")
.foregroundColor(lightBlueColor)
.fontWeight(.semibold)
.padding(.leading, 10)