This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"github.com/wesovilabs/koazee" | |
"koazee-examples-v2/model" | |
"time" | |
) | |
func main() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"github.com/wesovilabs/koazee" | |
"koazee-examples-v2/model" | |
) | |
func main() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a GraphQL Schema for an API to manage movies | |
"""Type of movie""" | |
enum Genre{ | |
Drama | |
Comedia | |
SciFi | |
Horror | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum Genre{ | |
Drama | |
Comedia | |
SciFi | |
Horror | |
} | |
scalar Year | |
scalar Url |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query { | |
getMeeting(meetingId:"meeting001"){ | |
id | |
organizer{ | |
identifier | |
firstname | |
lastname | |
salary(currency:Euro) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} |