Skip to content

Remove emphasize-lines #518

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/includes/steps-task-tracker-web-apollo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ content: |

.. literalinclude:: /tutorial/generated/code/final/RealmApolloProvider.codeblock.realmApolloProvider.js
:caption: ``src/graphql/RealmApolloProvider.js``
:emphasize-lines: 2-6
:language: javascript
---
title: Authenticate GraphQL Requests
ref: authenticate-graph-ql-requests
Expand All @@ -26,4 +26,4 @@ content: |

.. literalinclude:: /tutorial/generated/code/final/RealmApolloProvider.codeblock.createRealmApolloClient.js
:caption: ``src/graphql/RealmApolloProvider.js``
:emphasize-lines: 4, 13
:language: javascript
26 changes: 12 additions & 14 deletions source/tutorial/nodejs-cli.txt
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,14 @@ line with a line of code that opens a {+realm+} and assigns it to the ``realm``
property. It will look like this:

.. literalinclude:: /tutorial/generated/code/final/index.codeblock.openRealm.js
:emphasize-lines: 9
:language: javascript

Now that you have implemented the ``openRealm`` function, you will now need to
complete the code that retrieves the {+realm+}. In ``index.js``, find the
``getRealm`` function. It will look like this:

.. literalinclude:: /tutorial/generated/code/final/index.codeblock.getRealm.js
:emphasize-lines: 3
:language: javascript

At this point, your app is pointing to your backend and opens a connection
to it when you start the app. However, users cannot log in yet, so let's update
Expand All @@ -184,7 +184,7 @@ Find the the ``logIn`` function and add the following code to create a
``emailPassword`` credential and call the ``logIn()`` method.

.. literalinclude:: /tutorial/generated/code/final/users.codeblock.userLogin.js
:emphasize-lines: 17, 18, 19, 22
:language: javascript

E. Implement the CRUD methods
-----------------------------
Expand All @@ -204,7 +204,7 @@ In ``tasks.js``:
and pass in the name of the collection:

.. literalinclude:: /tutorial/generated/code/final/tasks.codeblock.getTasks.js
:emphasize-lines: 3
:language: javascript


* ``getTask``
Expand All @@ -214,7 +214,7 @@ In ``tasks.js``:
function to get a task by its Id.

.. literalinclude:: /tutorial/generated/code/final/tasks.codeblock.getTask.js
:emphasize-lines: 11
:language: javascript


* ``createTask``
Expand All @@ -227,8 +227,7 @@ In ``tasks.js``:
required properties:

.. literalinclude:: /tutorial/generated/code/final/tasks.codeblock.createTask.js
:emphasize-lines: 23, 24, 25, 26, 27, 28

:language: javascript

.. note::

Expand All @@ -247,7 +246,7 @@ In ``tasks.js``:
to delete and then the :js-sdk:`delete() <Realm.html#delete>` function on that task:

.. literalinclude:: /tutorial/generated/code/final/tasks.codeblock.deleteTask.js
:emphasize-lines: 18, 20
:language: javascript


* ``modifyTask``
Expand All @@ -259,7 +258,7 @@ In ``tasks.js``:
and Sync ensures the object is updated on the server.

.. literalinclude:: /tutorial/generated/code/final/tasks.codeblock.modifyTask.js
:emphasize-lines: 6, 7
:language: javascript


.. note::
Expand All @@ -275,7 +274,7 @@ In ``projects.js``:
method to get the current user and then access the current user's ``memberOf`` property.

.. literalinclude:: /tutorial/generated/code/final/projects.codeblock.getProjects.js
:emphasize-lines: 4, 5
:language: javascript

F. Use Realm Functions
----------------------
Expand All @@ -291,7 +290,7 @@ implement the calls to {+service-short+}.
using the ``User.functions`` method.

.. literalinclude:: /tutorial/generated/code/final/team.codeblock.getTeamMembers.js
:emphasize-lines: 4
:language: javascript

* ``addTeamMember``

Expand All @@ -300,7 +299,7 @@ implement the calls to {+service-short+}.
parameter.

.. literalinclude:: /tutorial/generated/code/final/team.codeblock.addTeamMember.js
:emphasize-lines: 12
:language: javascript

* ``removeTeamMember``

Expand All @@ -309,8 +308,7 @@ implement the calls to {+service-short+}.
{+service-short+} function and pass it the ``email`` parameter.

.. literalinclude:: /tutorial/generated/code/final/team.codeblock.removeTeamMember.js
:emphasize-lines: 15

:language: javascript


H. Run and Test
Expand Down
7 changes: 0 additions & 7 deletions source/tutorial/web-graphql.txt
Original file line number Diff line number Diff line change
Expand Up @@ -180,14 +180,12 @@ authentication.
``emailPassword`` credential by calling the ``logIn()`` method.

.. literalinclude:: /tutorial/generated/code/final/LoginScreen.codeblock.handleLogin.js
:emphasize-lines: 5
:language: javascript

Next, find the ``handleRegistrationAndLogin`` function and add the following code
to create a ``emailPassword`` credential.

.. literalinclude:: /tutorial/generated/code/final/LoginScreen.codeblock.handleRegistrationAndLogin.js
:emphasize-lines: 6


D. Define the GraphQL Schema & Operations
Expand Down Expand Up @@ -230,19 +228,16 @@ following functions and call the appropriate mutations:
* ``useAddTask``

.. literalinclude:: /tutorial/generated/code/final/useTaskMutations.codeblock.useAddTask.js
:emphasize-lines: 18-26
:language: javascript

* ``useUpdateTask``

.. literalinclude:: /tutorial/generated/code/final/useTaskMutations.codeblock.useUpdateTask.js
:emphasize-lines: 3-8
:language: javascript

* ``useDeleteTask``

.. literalinclude:: /tutorial/generated/code/final/useTaskMutations.codeblock.useAddTask.js
:emphasize-lines: 3-8
:language: javascript

E. Connect Apollo to the GraphQL API
Expand Down Expand Up @@ -270,7 +265,6 @@ In the file ``/graphql/useProjects.js``, we need to implement the retrieval of t
current user's projects. We'll need to add the following code:

.. literalinclude:: /tutorial/generated/code/final/useProjects.codeblock.useProjects.js
:emphasize-lines: 6
:language: javascript

G. Use Realm functions
Expand All @@ -287,7 +281,6 @@ implement the ``addTeamMember()`` and ``removeTeamMember()`` functions so that
the user as a team member when provided with their email.

.. literalinclude:: /tutorial/generated/code/final/EditPermissionsModal.codeblock.useTeamMembers.js
:emphasize-lines: 5, 6-9, 19-31
:language: javascript

Try It Out
Expand Down