This file contains 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
require('isomorphic-fetch'); | |
const AUTH_TYPE = require('aws-appsync/lib/link/auth-link').AUTH_TYPE; | |
const AWSAppSyncClient = require('aws-appsync').default; | |
const gql = require('graphql-tag'); | |
const uuid = require('uuid/v4'); | |
const listMessages = gql(` | |
query getConversationMessages($conversationId: ID!, $after: String, $first: Int) { | |
allMessageConnection(conversationId: $conversationId, after: $after, first: $first) { | |
__typename |
This file contains 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
require('isomorphic-fetch'); | |
const AUTH_TYPE = require('aws-appsync/lib/link/auth-link').AUTH_TYPE; | |
const AWSAppSyncClient = require('aws-appsync').default; | |
const AmazonCognitoIdentity = require('amazon-cognito-identity-js'); | |
const gql = require('graphql-tag'); | |
const listMessages = gql(` | |
query getConversationMessages($conversationId: ID!, $after: String, $first: Int) { | |
allMessageConnection(conversationId: $conversationId, after: $after, first: $first) { | |
__typename |
This file contains 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 json | |
import os | |
import requests | |
from requests_aws4auth import AWS4Auth | |
def lambda_handler(event, context): | |
region_name = os.environ["REGION"] | |
app_name = os.environ["ENDPOINT"] | |
service = 'appsync-api' |
This file contains 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
<template> | |
<div class="hello"> | |
<h1>{{ msg }}</h1> | |
<div class="section"> | |
<el-input type="text" v-model="input" auto-complete="off" style="width:80%;"></el-input> | |
</div> | |
<div class="section"> | |
<el-button type="button" @click="send">送信</el-button> | |
<el-button type="button" @click="disconnect">切断</el-button> | |
</div> |
This file contains 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
const app = new Vue({ | |
el: '#app', | |
data: { | |
message: "こんにちは", | |
userId: "", | |
displayName: "", | |
accessToken: "", | |
scope: "", | |
client_id: "", | |
expires_in: "" |
This file contains 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
const axios = require('axios'); | |
const createResponse = (statusCode, content) => { | |
const body = JSON.stringify(content); | |
const response = { | |
"statusCode": statusCode, | |
"headers": { | |
"Access-Control-Allow-Origin": "*" | |
}, | |
"body": body |
This file contains 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
const getMovies = `query GetMovies{ | |
getMovies(id: 0) { | |
id | |
name | |
poster | |
date | |
plot | |
} | |
} | |
`; |
OlderNewer