Skip to content

Instantly share code, notes, and snippets.

View ivancorrales's full-sized avatar
🐾
Doing what I love to do!

Iván Corrales Solera ivancorrales

🐾
Doing what I love to do!
View GitHub Profile
package main
import (
"fmt"
"github.com/wesovilabs/koazee"
"koazee-examples-v2/model"
"time"
)
func main() {
package main
import (
"fmt"
"github.com/wesovilabs/koazee"
"koazee-examples-v2/model"
)
func main() {
package main
import (
"fmt"
"github.com/wesovilabs/koazee"
"koazee-examples-v2/model"
)
func main() {
fmt.Println("Print the title of albums provided by 'Columbia Records'")
var months = ['January','February','March','April','May','June','July','August','September','October', 'November','December']
function main() {
var currentDate = new Date();
var day = currentDate.getDate();
var month = months[currentDate.getMonth()]
var tasks = getTasksToBeNotified(day,month)
tasks = orderTasks(tasks)
createDocumentAndNotify(tasks,day,month)
}
@ivancorrales
ivancorrales / schema-defs.graphql
Created January 20, 2019 10:10
GraphQL schema with definitions & comments
# This is a GraphQL Schema for an API to manage movies
"""Type of movie"""
enum Genre{
Drama
Comedia
SciFi
Horror
}
@ivancorrales
ivancorrales / schema-basic.graphql
Created January 20, 2019 10:10
GraphQL schema for movies API
enum Genre{
Drama
Comedia
SciFi
Horror
}
scalar Year
scalar Url
@ivancorrales
ivancorrales / workshop-schema.graphql
Created January 23, 2019 06:53
graphl-schema-documented
# This schema is used for wokshop
"""Custom scalar type for emails"""
scalar Email
"""Custom scalar type for date times"""
scalar Datetime
"""This scalar type is used for Url's"""
scalar Url
# In the future we could add new currencies if required
mutation{
createRoom1:addRoom(room:{id:"room01",capacity:5}){
id
}
createRoom2: addRoom(room:{id:"room02",capacity:6}){
id
capacity
}
createRoom3: addRoom(room:{id:"room03",capacity:8}){
capacity
query {
getMeeting(meetingId:"meeting001"){
id
organizer{
identifier
firstname
lastname
email
salary(currency:Euro)
}
@ivancorrales
ivancorrales / schema.graphql
Last active March 4, 2019 04:40
GraphQL schema
schema {
# The query root of Workshop GraphQL interface.
query: Query
# The root query for implementing GraphQL mutations.
mutation: Mutation
# The root query for implementing GraphQL subscriptions.
subscription: Subscription
}