123456789101112131415161718 |
- module Gql::Concern::HasNestedGraphqlName
- extend ActiveSupport::Concern
- included do
- def self.inherited(subclass)
- super
- return if !subclass.name
- subclass.graphql_name(subclass.name.sub(%r{Gql::[^:]+::}, '').gsub('::', '').sub(%r{Type\Z}, ''))
- end
- def self.graphql_field_name
- graphql_name.camelize(:lower).to_sym
- end
- end
- end
|