Last active
April 8, 2019 22:24
-
-
Save hpoit/846f68ae0318b8a59ae4dab041b3e8f7 to your computer and use it in GitHub Desktop.
GraphQL_schemas_and_types.jl
This file contains 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
# Object types and fields | |
struct Character | |
name::String | |
appearsIn::EpisodeArray | |
end | |
# Arguments | |
mutable struct Starship | |
id::ID | |
name::String | |
length::Float | |
end | |
# Query and mutation types | |
mutable struct Schema | |
query::Query | |
mutation::Mutation | |
end | |
# Scalar types (not necessary because Julia already has them?) | |
# see https://graphql.org/learn/schema/#scalar-types | |
# Enumeration types (are sets in Julia, also not necessary?) | |
# see https://graphql.org/learn/schema/#enumeration-types | |
# Lists and non-null | |
# SHOULD be used for a null list that can't have null elements, and non-null list that can contain null elements | |
# not behaving as desired | |
a = [1, ] | |
ismissing(a) # a is an Array | |
# Interfaces | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment