Sha256: da0cac920d3c6715c69a9f8e52d29f218e8065aed12ca933675999dc53896dc3
Contents?: true
Size: 333 Bytes
Versions: 2
Compression:
Stored size: 333 Bytes
Contents
# frozen_string_literal: true module Ibrain module Extentions class DefaultValue < GraphQL::Schema::FieldExtension description 'Default value extention' def after_resolve(value:, **_rest) if value.nil? options[:default_value] else value end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ibrain-core-0.1.3 | app/graphql/ibrain/extentions/default_value.rb |
ibrain-core-0.1.2 | app/graphql/ibrain/extentions/default_value.rb |