What are mutations in GraphQL?

< 1 min readIn GraphQL, a mutation is a type of operation that allows clients to make changes to the data on the server. Mutations are typically used to create, update, or delete data in a database. They are similar to the “write” operations in a traditional REST API. Unlike queries, which only retrieve data, mutations change the…

Read More

Top terminal keyboard shortcuts for developers

2 min readTerminal shortcuts are an essential tool for developers, as they allow for quick and efficient navigation and manipulation of files and directories. Here are some of the top terminal shortcuts that every developer should know: Ctrl + A This shortcut moves the cursor to the beginning of the current line. Ctrl + E This shortcut…

Read More

How to use Redis for message queues with example

< 1 min readRedis can be used for message queues by leveraging its support for lists and its built-in RPOPLPUSH command. Here’s an example of using Redis for message queues in Python: This example demonstrates a simple use case of Redis for message queues: a producer adds a message to a list-based queue, and a consumer retrieves and…

Read More

How do expire Redis keys?

< 1 min readIn Redis, you can use the “EXPIRE” command to set an expiration time for a key, after which the key will be automatically deleted. The command takes two arguments: the key, and the number of seconds after which the key should expire. For example, to set an expiration time of 30 minutes (1800 seconds) for…

Read More