Module: Graphiti::ActiveGraph::JsonapiExt::Serializable::ResourceExt

Defined in:
lib/graphiti/active_graph/jsonapi_ext/serializable/resource_ext.rb

Instance Method Summary collapse

Instance Method Details

#as_jsonapi(fields: nil, include: []) ⇒ Object



3
4
5
6
# File 'lib/graphiti/active_graph/jsonapi_ext/serializable/resource_ext.rb', line 3

def as_jsonapi(fields: nil, include: [])
  include.merge(fields) if fields.present?
  super(fields: fields, include: include)
end