This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE IF NOT EXISTS default.operation_collection | |
( | |
target LowCardinality(String) CODEC(ZSTD(1)), | |
hash String CODEC(ZSTD(1)), | |
name String CODEC(ZSTD(1)), | |
body String CODEC(ZSTD(1)), | |
operation_kind String CODEC(ZSTD(1)), | |
coordinates Array(String) CODEC(ZSTD(1)), | |
total UInt32 CODEC(T64, ZSTD(1)), | |
timestamp DateTime('UTC') CODEC(DoubleDelta, LZ4), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createCheck, runCheck } from '../providers/checks'; | |
// <step status> (<requirement>) -> <step status> (<requirement>) = <failed step index 1,2...n> (<result status>) | |
runTest('skipped (optional) -> skipped (optional) = (completed)'); | |
runTest('completed (optional) -> skipped (optional) = (completed)'); | |
runTest('skipped (optional) -> skipped (required) = 2 (failed)'); | |
runTest('skipped (required) -> skipped (required) = 1 (failed)'); | |
runTest('completed (required) -> skipped (required) = 2 (failed)'); | |
runTest('completed (optional) -> skipped (required) = 2 (failed)'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// actions | |
const addSuspensed = assign({ | |
suspendedCount: context => context.suspendedCount + 1 | |
}); | |
const removeSuspensed = assign({ | |
suspendedCount: context => context.suspendedCount - 1 | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Before | |
this.addTransactionGQL.mutate( | |
{ input }, | |
{ | |
update: (cache, result) => { | |
const data = cache.readQuery<GetTransactions.Query>({ | |
query: GET_TRANSACTIONS_QUERY | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sofa, { OpenAPI } from 'sofa-api'; | |
const openApi = OpenAPI({ | |
schema, | |
info: { | |
title: 'Example API', | |
version: '3.0.0', | |
}, | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sofa from 'sofa-api'; | |
import express from 'express'; | |
const app = express(); | |
app.use( | |
sofa({ schema }) | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.loona | |
.mutate(NewMessage, variables, { | |
optimisticResponse: { | |
newMessage: { | |
__typename: 'Message', | |
id: randomID(), | |
text, | |
createdAt: new Date(), | |
sender, | |
recipient, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Injectable() | |
export class ChatsService { | |
constructor( | |
private http: HttpClient, | |
private store: Store<AppState> | |
) {} | |
getChats() { | |
return this.store | |
.select(state => state.chats) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
chats @rest(type: "Chat", path: "/chats") | |
{ | |
id @export(as: "chatId") | |
members @rest(type: "[User]", path: "/chats/:chatId/members") { | |
...UserFragment | |
} | |
recentMessage @type(name: "Message") { | |
...MessageFragment | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
workflow "On Push" { | |
on = "push" | |
resolves = "Check GraphQL with Inspector" | |
} | |
workflow "On Pull Request" { | |
on = "pull_request" | |
resolves = "Check GraphQL with Inspector" | |
} |
NewerOlder