Last active
January 5, 2017 19:30
-
-
Save shantiii/2263547b5165133beb70eec642e9f3ff to your computer and use it in GitHub Desktop.
absinthe diamond dependencies
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
defmodule CoreTypes do | |
object :user do | |
field :id, :id | |
field :name, :string | |
end | |
object :product do | |
field :id, :id | |
field :author, :user | |
end | |
end | |
defmodule SearchTypes do | |
import_types CoreTypes | |
object :search_result do | |
field :query, :string | |
field :results, list_of(:product) | |
end | |
end | |
defmodule FeatureTypes do | |
import_types CoreTypes | |
object :feature_flag do | |
field :creator, :user | |
field :name, :string | |
end | |
end | |
defmodule Schema do | |
import_types SearchTypes | |
import_types FeatureTypes | |
query do | |
... | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try this: