Skip to content

Instantly share code, notes, and snippets.

Praveen Durairaj praveenweb

Block or report user

Report or block praveenweb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@praveenweb
praveenweb / codegen.js
Created Sep 5, 2019
graphql-code-generator-config
View codegen.js
module.exports = {
"schema": [
{
"http://localhost:8080/v1/graphql": {
"headers": {
// neccessary auth headers to fetch schema
}
}
}
],
@praveenweb
praveenweb / AuthorSubscriptions.svelte
Created May 23, 2019
GraphQL Subscriptions using Svelte
View AuthorSubscriptions.svelte
<script context="module">
import gql from 'graphql-tag';
import { client } from './apollo';
import { subscribe } from 'svelte-apollo';
const AUTHOR_LIST = gql`
subscription {
author(order_by: [{name: asc}]) {
name
@praveenweb
praveenweb / Articles.svelte
Created May 23, 2019
Fetch Articles using GraphQL in Svelte
View Articles.svelte
<script context="module">
import gql from 'graphql-tag';
import { client } from './apollo';
const ARTICLES = gql`
{
article {
id
title
author {
@praveenweb
praveenweb / Articles.svelte
Created May 23, 2019
Fetch Articles using GraphQL in Svelte
View Articles.svelte
<script context="module">
import gql from 'graphql-tag';
import { client } from './apollo';
const ARTICLES = gql`
{
article {
id
title
author {
@praveenweb
praveenweb / static.config.js
Created Feb 11, 2019
react-static routing with GraphQL data fetch
View static.config.js
import client from './src/apollo'
import {GET_AUTHOR, GET_ARTICLE} from './src/graphql/queries'
export default {
getSiteData: () => ({
title: 'React Static with Hasura GraphQL',
}),
getRoutes: async () => {
const {
data: { author },
View index.vue
<template>
<div>
<h3>Authors</h3>
<ul>
<li v-for="item in author" :key="item.id">
<nuxt-link :to="`/article/${item.id}`">
{{ item.name }}
</nuxt-link>
</li>
</ul>
View fullstack-observability-honeycomb-beeline
require("honeycomb-beeline")({
writeKey: "<your-write-key>",
dataset: "node-js"
// ... additional optional configuration ...
});
View fullstack-observability-datadog-nodejs-tracing
var tracer = require('dd-trace').init({
hostname: '<host-name>',
port: 8126,
debug: true
});
tracer.use('express');
View fullstack-observability-datadog-apm
docker run -d -v /var/run/docker.sock:/var/run/docker.sock:ro \
-v /proc/:/host/proc/:ro \
-v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro \
-e DD_API_KEY=<YOUR_API_KEY> \
-e DD_APM_ENABLED=true \
datadog/agent:latest
View fullstack-observability-datadog-docker
docker run -d --name dd-agent -v /var/run/docker.sock:/var/run/docker.sock:ro -v /proc/:/host/proc/:ro -v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro -e DD_API_KEY=<your-api-key> datadog/agent:latest
You can’t perform that action at this time.