Deploy a GraphQL API in one step. Define your schema and Dgraph does the rest.
deploy
You now have a GraphQL API up and running and a graph database as a backend.
GraphQL endpoint
with any GraphQL clients such as
GraphQL Playground,
Insomnia,
GraphiQL,
Altair or Postman.
If you want to use those clients, copy the GraphQL endpoint
from the
Cloud dashboard.
You may want to use the introspection capability of the client to explore the
schema, queries, and mutations that were generated by Dgraph.
username: String! @id
, the
username
field acts like an ID, so we can identify customers just with their
names.
Products, on the other hand, had productID: ID!
, so theyโll get an
auto-generated ID which are returned by the mutation.
0x2
. Make sure to replace
the product ID with the ID from the response of the previous mutation.
@search(by: [fulltext])
tells Dgraph we want to be able to
search for comments with full-text search.
Dgraph took that directive and the other information in the schema, and built
queries and search into the API.
Letโs find all the products that were easy to install.