Skip to content

Commit

Permalink
Merge pull request #1660 from mdyd-dev/newGuiUpdates
Browse files Browse the repository at this point in the history
Updated to fit new GUI
  • Loading branch information
z-x authored Dec 1, 2023
2 parents d5cb33d + ca5f3cb commit 8646729
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
Binary file modified app/assets/images/get-started/todo/gui_graphiql_delete.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/assets/images/get-started/todo/gui_graphiql_mutation.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/assets/images/get-started/todo/gui_graphiql_query.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/assets/images/get-started/todo/gui_records.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,4 @@ One last step you musn’t forget is to update the `index` page. You have a `for

To test the data removal functionality, add an item or a few to your _To Do_ list and then click on the _Mark as done_ button, which should effectively remove that particular item from your list.

{% render 'alert/next', content: 'Sending email notifications', url: '/get-started/build-your-first-app/sending-email-notifications' %}
{% render 'alert/next', content: 'Sending email notifications', url: '/get-started/build-your-first-app/sending-email-notifications' %}
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Before using the query on your page, it would be a good idea to test if it works
To test the query, you are going to use one of the tools built in the `pos-cli`. To start the tool, use the following command:

```bash
pos-cli gui serve staging
pos-cli gui serve <environment>
```

When the application is running, go to [http://localhost:3333](http://localhost:3333) in your browser and choose _Go to GraphiQL_. Paste the GraphQL query you’ve just written to the text area on left. Pressing the big play button on top should result in the output of the query being presented in the right column.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,16 @@ How can you make sure that the table you’ve just created is really there in th
For this purpose, we have created a tool that allows you to browse through the tables and edit the records. Run this command to start the tool:

```bash
pos-cli gui serve staging
pos-cli gui serve <environment>
```

This starts an application to help you administer your instance. When the application is running you can go to [http://localhost:3333](http://localhost:3333) in your browser.

There is a selection of tools you can use. The one that will allow you to look at the database is the one in the first box. Click on the _Go to Records_ link to open a list of tables that you created using YAML files.
There is a selection of tools you can use. The one that will allow you to look at the database is the one in the first box. Click on the _Database_ link to open a list of tables that you created using YAML files.

If everything went right, you should see the newly created `item` table on the list.

<img loading="lazy" src="{{ 'images/get-started/todo/gui_records.jpg' | asset_url }}" alt="Graphic interface for browsing the database on platformOS">
<img loading="lazy" src="{{ 'images/get-started/todo/gui_records.jpg' | asset_url }}" alt="Graphic interface for browsing the database on platformOS" class="border">


## Save the data in the database
Expand Down Expand Up @@ -199,7 +199,7 @@ When you want to write more Liquid than a single line, put the code between {% r
```
{% endraw %}

This is a place where you execute your GraphQL query. You run the query located in /app/graphql/item/create.graphql, but you don’t need to pass the whole path, as the platform knows where to look for the queries. You defined a variable called $title in your graphql, so you need to pass it to the query, but you don’t want it to be empty, that’s why you assign a value context.params.title to it. All query params passed to the page will be always available in the context.params variable.
This is a place where you execute your GraphQL query. You run the query located in `/app/graphql/item/create.graphql`, but you don’t need to pass the whole path, as the platform knows where to look for the queries. You defined a variable called $title in your graphql, so you need to pass it to the query, but you don’t want it to be empty, that’s why you assign a value context.params.title to it. All query params passed to the page will be always available in the context.params variable.

{% raw %}
```liquid
Expand All @@ -213,7 +213,7 @@ Your GraphQL query will return the id and the title of the record you’ve just
if result.record.id
```

If the query worked, you might want to redirect the user from your /item/create page to the index page using Liquid’s redirect_to tag.
If the query worked, you might want to redirect the user from your `/item/create` page to the index page using Liquid’s `redirect_to` tag.

```liquid
redirect_to '/'
Expand Down

0 comments on commit 8646729

Please sign in to comment.