Skip to content

Commit 4e72f8b

Browse files
committed
Update README from #44
1 parent 7cf4797 commit 4e72f8b

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,12 @@ class User < Sanity::Resource
127127
queryable
128128
publishable
129129
end
130+
131+
# If your class name doesn't match the Sanity document type, use `document_type`:
132+
class Cms::BlogPost < Sanity::Resource
133+
self.document_type = :post
134+
# ...
135+
end
130136
```
131137

132138

@@ -357,6 +363,7 @@ groq_query = <<-GROQ
357363
GROQ
358364

359365
Sanity::Document.where(groq: groq_query, variables: {name: "Monsters, Inc."})
366+
# Note: symbols are treated like strings when passed as variables
360367
```
361368

362369

0 commit comments

Comments
 (0)