graphql-elixir / graphql

GraphQL Elixir
Other
858 stars 45 forks source link

Schema DSL #21

Closed freshtonic closed 8 years ago

freshtonic commented 8 years ago

This extends @1player's PR, but with field inheritance working with an additional extend macro.

patrickdet commented 8 years ago

This allows for multi-inheritance like (convoluted example)

defmodule Employee do
    use GraphQL.Object
    extend Person
    extend Manager

    field :salary
  end

I can't find what stance the GraphQL spec has on that. Maybe it's not an issue.

freshtonic commented 8 years ago

@patrickdet I'm all for not merging this until if/when there is a clear need for it. Getting the previous patch working was more of an itch to scratch for me personally while I'm on the upward slope of the Elixir learning curve.