Skip to content

Commit 24fb10d

Browse files
zeislerrichmolj
authored andcommitted
Allow attribute to be used, but not to show up in the schema (graphiti-api#12)
* Allow "null" to be passed in filters Docs for PR graphiti-api/graphiti#158 * Update guides/concepts/resources.md Grammar fix
1 parent e118f65 commit 24fb10d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

guides/concepts/resources.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ attribute :first_name, :string
8282

8383
{% include h.html tag="h4" text="2.1 Limiting Behavior" a="limiting-behavior" %}
8484

85-
Each attribute consists of four flags: `readable`, `writable`,
86-
`sortable`, and `filterable`. Any of these flags can be turned off:
85+
Each attribute consists of five flags: `readable`, `writable`,
86+
`sortable`, `filterable`, and `schema`. Any of these flags can be turned off:
8787

8888
{% highlight ruby %}
8989
attribute :name, :string, sortable: false
@@ -96,6 +96,9 @@ attribute :name, :string, only: [:sortable]
9696
attribute :name, :string, except: [:writable]
9797
{% endhighlight %}
9898

99+
The `schema` flag is not affected by `only/except` options.
100+
This option determines if the attribute is exported to the schema.json.
101+
99102
You might want to allow behavior only if a certain condition is met.
100103
Pass a symbol to guard this behavior via corresponding method, only allowing the
101104
behavior if the method returns `true`:
@@ -130,6 +133,7 @@ self.attributes_readable_by_default = false # default true
130133
self.attributes_writable_by_default = false # default true
131134
self.attributes_filterable_by_default = false # default true
132135
self.attributes_sortable_by_default = false # default true
136+
self.attributes_schema_by_default = false # default true
133137
{% endhighlight %}
134138

135139
{% include h.html tag="h4" text="2.3 Customizing Display" a="customizing-display" %}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy