Skip to content

Commit

Permalink
Abhinav text suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
wilkerlucio committed Aug 22, 2019
1 parent 8ef28ef commit 7ffa2c4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions docs-src/modules/ROOT/pages/connect/resolvers.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@ of resolvers called by providing some base information that you already have, yo

== Alias resolvers

Sometimes you want to make an alias, that is, create a resolver that just converts one
name to another, for example:
Sometimes you might want to make an alias, that is, create a resolver which just converts one
name to another. For example:

[source,clojure]
----
Expand All @@ -270,7 +270,7 @@ name to another, for example:
----

The previous resolver will convert `:user/youtube-video-url` to `:youtube.video/id`. To make
that easy Pathom provides some helpers:
that easy, Pathom provides some helpers:

[source,clojure]
----
Expand Down
18 changes: 9 additions & 9 deletions docs-src/modules/ROOT/pages/core/parsers.adoc
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
= Parsers

Parsers are the core of what Pathom does. This section explains what Pathom parser does,
explain their responsibilities and details how they work.
Parsers are at the core of what Pathom does. This section explains how Pathom parsers
accomplish this responsibility and describes how they work.

== The parser job

Every EQL transaction is a vector, this means that by definition an EQL transaction is
a collection of things. The parser job is to walk this collection, figures the value
Every EQL transaction is a vector, this means that, by definition, an EQL transaction is
a collection of things. The parser's job is to walk this collection, figures the value
of each requested entry and return a map with them.

In case of Pathom parsers they also have a distinction between `read` and `mutate`, when
Expand Down Expand Up @@ -88,14 +88,14 @@ Compare these two queries:
----

How many elements each query have? And the answer is two, for both. It just
happens that one the second query, the second element is a join; but for the
parser point of view, in the first case it gets `:a` and `:b`, while on
happens that in the second query, the second element is a join; but from the
parser's point of view, in the first case it gets `:a` and `:b`, while in
the second case it gets `:a` and `{:b [:c]}`.

That's the reason why it's not valid to do multiple joins in the same map on EQL,
That's the reason why it's not valid to do multiple joins in the same map in EQL,
the map itself is considered one entry, because the parser sees it as one element.

Pathom process sub queries at reader level. The reader can look at the
Pathom processes sub-queries at the reader level. The reader can look at the
AST and see that element has `:children`, then it calls the parser again with the
children (and usually with some modifications to the environment) to process that
sub query.
Expand Down Expand Up @@ -126,7 +126,7 @@ and return its value, no matter what you ask, you can try it:
<div class="space"></div>
++++

Notice that if you do queries with joins, they will be just ignored, the reader returns
Notice that if you do queries with joins, they will just be ignored, the reader returns
the value immediately. If we like to increase the counter only on the leaves, we can leverage
Pathom xref:core/readers.adoc#vector-dispatcher[reader composition] and put something before just to walk the joins.

Expand Down

0 comments on commit 7ffa2c4

Please sign in to comment.