mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 17:02:49 +03:00
docs update (#699)
This commit is contained in:
parent
813795d094
commit
9c2ca7cd54
@ -89,7 +89,7 @@ Execute ``docker-run.sh`` & check if everything is running well:
|
||||
$ docker ps
|
||||
|
||||
CONTAINER ID IMAGE ... CREATED STATUS PORTS ...
|
||||
097f58433a2b hasura/graphql-engine ... 1m ago Up 1m 8080->8080/tcp ...
|
||||
097f58433a2b hasura/graphql-engine.. ... 1m ago Up 1m 8080->8080/tcp ...
|
||||
|
||||
Step 3: Open the hasura console
|
||||
-------------------------------
|
||||
@ -99,15 +99,13 @@ Head to http://localhost:8080/console to open the Hasura console.
|
||||
Step 4: Track existing tables and relationships
|
||||
-----------------------------------------------
|
||||
|
||||
On the console page, you'll see your existing tables/view as "Untracked tables/views" in the console. Click the
|
||||
``Add all`` button to enable GraphQL APIs over them.
|
||||
|
||||
.. image:: ../../../../img/graphql/manual/getting-started/TrackTable.jpg
|
||||
See :doc:`../../schema/using-existing-database` to enable GraphQL over the database.
|
||||
|
||||
Advanced:
|
||||
---------
|
||||
|
||||
- :doc:`Securing your GraphQL endpoint <securing-graphql-endpoint>`
|
||||
- :doc:`GraphQL engine server logs <logging>`
|
||||
- :doc:`Updating GraphQL engine <updating>`
|
||||
- :doc:`Setting up migrations <../../migrations/index>`
|
||||
|
||||
@ -116,4 +114,5 @@ Advanced:
|
||||
:hidden:
|
||||
|
||||
Securing your GraphQL endpoint <securing-graphql-endpoint>
|
||||
GraphQL engine server logs <logging>
|
||||
Updating GraphQL engine <updating>
|
||||
|
20
docs/graphql/manual/deployment/docker/logging.rst
Normal file
20
docs/graphql/manual/deployment/docker/logging.rst
Normal file
@ -0,0 +1,20 @@
|
||||
Hasura GraphQL engine server logs (Docker)
|
||||
==========================================
|
||||
|
||||
You can check logs of Hasura GraphQL engine deployed using Docker by checking the logs of the
|
||||
GraphQL engine container:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ docker ps
|
||||
|
||||
CONTAINER ID IMAGE ...
|
||||
cdfbc6b94c70 hasura/graphql-engine.. ...
|
||||
|
||||
$ docker logs cdfbc6b94c70
|
||||
|
||||
{"timestamp":"2018-10-09T11:20:32.054+0000", "level":"info", "type":"http-log", "detail":{"status":200, "query_hash":"01640c6dd131826cff44308111ed40d7fbd1cbed", "http_version":"HTTP/1.1", "query_execution_time":3.0177627e-2, "request_id":null, "url":"/v1alpha1/graphql", "hasura_metadata":null, "ip":"127.0.0.1", "response_size":209329, "method":"POST", "hasura_role":null, "detail":null}}
|
||||
...
|
||||
|
||||
|
||||
See https://docs.docker.com/config/containers/logging for more details on logging in Docker.
|
@ -93,6 +93,7 @@ Advanced:
|
||||
|
||||
- :doc:`Securing your GraphQL endpoint <securing-graphql-endpoint>`
|
||||
- :doc:`using-existing-heroku-database`
|
||||
- :doc:`GraphQL engine server logs <logging>`
|
||||
- :doc:`Updating GraphQL engine <updating>`
|
||||
- :doc:`Setting up migrations <../../migrations/index>`
|
||||
|
||||
@ -102,4 +103,5 @@ Advanced:
|
||||
|
||||
Securing your GraphQL endpoint <securing-graphql-endpoint>
|
||||
using-existing-heroku-database
|
||||
GraphQL engine server logs <logging>
|
||||
Updating GraphQL engine <updating>
|
||||
|
14
docs/graphql/manual/deployment/heroku/logging.rst
Normal file
14
docs/graphql/manual/deployment/heroku/logging.rst
Normal file
@ -0,0 +1,14 @@
|
||||
Hasura GraphQL engine server logs (Heroku)
|
||||
==========================================
|
||||
|
||||
You can use the `Heroku CLI <https://devcenter.heroku.com/articles/heroku-cli>`_ to check logs
|
||||
of Hasura GraphQL engine deployed on Heroku:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ heroku logs --app <hasura-graphql-engine-app-name>
|
||||
|
||||
2018-10-09T11:18:21.306000+00:00 app[web.1]: {"timestamp":"2018-10-09T11:18:21.305+0000", "level":"info", "type":"http-log", "detail":{"status":200, "query_hash":"48c74f902b53a886f9ddc1b7dd12a4a6020d70c3", "http_version":"HTTP/1.1", "query_execution_time":9.477913e-3, "request_id":"b7bb6fb3-97b3-4c6f-a54a-1e0f71a190e9", "url":"/v1alpha1/graphql", "hasura_metadata":null, "ip":"171.61.77.16", "response_size":15290, "method":"POST", "hasura_role":null, "detail":null}}
|
||||
...
|
||||
|
||||
See https://devcenter.heroku.com/articles/logging for more details on logging in Heroku.
|
@ -23,6 +23,10 @@ to configure Hasura GraphQL engine for your production environment:
|
||||
- :doc:`postgres-permissions`
|
||||
- :doc:`GraphQL engine server configuration <graphql-engine-flags/index>`
|
||||
|
||||
For access to Hasura GraphQL engine server logs, check the below page for details:
|
||||
|
||||
- :doc:`Server logs <logging>`
|
||||
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
@ -35,4 +39,5 @@ to configure Hasura GraphQL engine for your production environment:
|
||||
securing-graphql-endpoint
|
||||
postgres-permissions
|
||||
GraphQL engine server configuration <graphql-engine-flags/index>
|
||||
GraphQL engine server logs <logging>
|
||||
Updating GraphQL engine <updating>
|
||||
|
@ -50,7 +50,7 @@ Step 4: Open the hasura console
|
||||
The above creates a LoadBalancer type service with port 80. So you should be able to access the console at the
|
||||
external IP.
|
||||
|
||||
For example, using docker-for-desktop on mac:
|
||||
For example, using Docker-for-desktop on Mac:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
@ -64,15 +64,13 @@ Head to: http://localhost and the console should load!
|
||||
Step 5: Track existing tables and relationships
|
||||
-----------------------------------------------
|
||||
|
||||
On the console page, you'll see your existing tables/views as "Untracked tables/views" in the console. Click the
|
||||
``Add all`` button to enable GraphQL APIs over them.
|
||||
|
||||
.. image:: ../../../../img/graphql/manual/getting-started/TrackTable.jpg
|
||||
See :doc:`../../schema/using-existing-database` to enable GraphQL over the database.
|
||||
|
||||
Advanced:
|
||||
---------
|
||||
|
||||
- :doc:`Securing your GraphQL endpoint <securing-graphql-endpoint>`
|
||||
- :doc:`GraphQL engine server logs <logging>`
|
||||
- :doc:`Updating GraphQL engine <updating>`
|
||||
- :doc:`Setting up migrations <../../migrations/index>`
|
||||
|
||||
@ -81,4 +79,5 @@ Advanced:
|
||||
:hidden:
|
||||
|
||||
Securing your GraphQL endpoint <securing-graphql-endpoint>
|
||||
GraphQL engine server logs <logging>
|
||||
Updating GraphQL engine <updating>
|
||||
|
12
docs/graphql/manual/deployment/kubernetes/logging.rst
Normal file
12
docs/graphql/manual/deployment/kubernetes/logging.rst
Normal file
@ -0,0 +1,12 @@
|
||||
Hasura GraphQL engine server logs (Kubernetes)
|
||||
==============================================
|
||||
|
||||
You can check logs of Hasura GraphQL engine deployed on Kubernetes by checking the logs of the
|
||||
GraphQL engine deployment:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ kubectl logs -f deploy/graphql-engine
|
||||
|
||||
|
||||
See https://kubernetes.io/docs/concepts/cluster-administration/logging for more details on logging in Kubernetes.
|
21
docs/graphql/manual/deployment/logging.rst
Normal file
21
docs/graphql/manual/deployment/logging.rst
Normal file
@ -0,0 +1,21 @@
|
||||
Hasura GraphQL engine server logs
|
||||
=================================
|
||||
|
||||
Based on your deployment method, Hasura GraphQL engine logs can be accessed as follows:
|
||||
|
||||
- :doc:`On Heroku <heroku/logging>`
|
||||
- :doc:`On Docker <docker/logging>`
|
||||
- :doc:`On Kubernetes <kubernetes/logging>`
|
||||
|
||||
Monitoring frameworks
|
||||
---------------------
|
||||
|
||||
You can integrate the logs emitted by Hasura GraphQL with external monitoring tools for better visibility as per
|
||||
your convenience.
|
||||
|
||||
For example, the following blog posts demonstrate integrating Hasura GraphQL engine logs with some external
|
||||
monitoring frameworks:
|
||||
|
||||
- `GraphQL Observability with Hasura GraphQL Engine and Honeycomb <https://blog.hasura.io/graphql-observability-with-hasura-graphql-engine-and-honeycomb-ee0a1a836c41>`_
|
||||
|
||||
- `Uptime Monitoring for Hasura GraphQL Engine with DataDog on GKE <https://blog.hasura.io/uptime-monitoring-for-hasura-graphql-engine-with-datadog-on-gke-4faff5832e7f>`_
|
@ -9,7 +9,8 @@ The current latest version is:
|
||||
|
||||
<code>hasura/graphql-engine:<span class="latest-release-tag">latest</span></code>
|
||||
|
||||
Please follow the appropriate guide to update the GraphQL engine version you're running:
|
||||
Based on your deployment method, follow the appropriate guide to update the GraphQL engine version you're running:
|
||||
|
||||
- :doc:`Updating on Heroku <./heroku/updating>`
|
||||
- :doc:`Updating on Docker <./docker/updating>`
|
||||
- :doc:`Updating on Heroku <heroku/updating>`
|
||||
- :doc:`Updating on Docker <docker/updating>`
|
||||
- :doc:`Updating on Kubernetes <kubernetes/updating>`
|
||||
|
@ -1,5 +1,5 @@
|
||||
Setting up schema using an existing database
|
||||
============================================
|
||||
Setting up GraphQL schema using an existing database
|
||||
====================================================
|
||||
|
||||
When you have an existing database with a schema already present, you don't need to create tables or views or run
|
||||
DDL queries through the Hasura console.
|
||||
@ -27,7 +27,8 @@ To track all tables and views present in the database:
|
||||
2) Track foreign-keys
|
||||
---------------------
|
||||
|
||||
Tracking a foreign-key means creating a :doc:`relationship <relationships/index>` between the tables involved in the foreign-key.
|
||||
Tracking a foreign-key means creating a :doc:`relationship <relationships/index>` between the tables involved in the
|
||||
foreign-key.
|
||||
|
||||
To track a foreign-key between two tables in the database:
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -59,6 +60,6 @@ To track all the foreign-keys of all tables in the database:
|
||||
For example, for the foreign-key ``article::author_id -> author::id``, the relationship names will be
|
||||
``authorByAuthorId`` for ``article`` table and ``articlesByAuthorId`` for ``author`` table.
|
||||
|
||||
You can change the relationship names by heading to the ``Relationships`` tab of the concerned table/view and
|
||||
You can change the relationship names by heading to the ``Relationships`` tab of the concerned table and
|
||||
dropping and recreating the relationship with a name of your choice.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user