From d35433c2633092ec03e2ff7a671bbadc8708d1d1 Mon Sep 17 00:00:00 2001 From: Kevin Date: Wed, 20 May 2020 09:55:33 -0400 Subject: [PATCH] Updated README - joins limitations assets note --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0747e9c..31febcd 100644 --- a/README.md +++ b/README.md @@ -152,7 +152,7 @@ To use GROQ fragments with this plugin, for now all fragments must be exported f ### Joins The ability to join multiple documents and retrieve their fields is a popular feature of GROQ. More testing needs to be done, but currently most join syntaxes are supported other than the `references()` function. -For Sanity users, if using the `->` operator you will need to append `._ref` to the field which contains the reference. So with a Sanity dataset, the usual +For Sanity users, if using the `->` operator for everything other than file assets (i.e. images) you will need to append `._ref` to the field which contains the reference. So with a Sanity dataset, the usual `referenceField->{ ... }` would instead look like this: `referenceField._ref->{ ... }`. Likewise for arrays: `arrayOfReferences[]._ref->{ ... }`. If you are only using Sanity data within your Gatsby project and would like to use the regular syntax, within the plugin options set `autoRefs: true` and you won't have to worry about appending the extra field. ### Other usage with gatsby-source-sanity