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
| using System; | |
| using Newtonsoft.Json; | |
| using System.Net.Http; | |
| using System.Net.Http.Headers; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace bha | |
| { | |
| public class GraphQL | |
| { |
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 React, {Component} from 'react' | |
| import {apolloClient} from './client' | |
| import {ApolloProvider} from '@apollo/react-hooks' | |
| class App extends Component { | |
| render() { | |
| return ( | |
| <ApolloProvider client={apolloClient}> |
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 { split } from 'apollo-link'; | |
| import { HttpLink } from 'apollo-link-http'; | |
| import { WebSocketLink } from 'apollo-link-ws'; | |
| import { getMainDefinition } from 'apollo-utilities'; | |
| import {setContext} from 'apollo-link-context' | |
| import {InMemoryCache} from 'apollo-cache-inmemory' | |
| import {ApolloClient} from 'apollo-client' | |
| const authLink = setContext((_, {headers}) => { |
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
| #include <iostream> | |
| #include <vector> | |
| using namespace std; | |
| struct Result | |
| { | |
| int fromIndex, len; | |
| long long total; |
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
| #include "Windows.h" | |
| #include <iostream> | |
| #include <conio.h> | |
| #include <cmath> | |
| #include <vector> | |
| #include <string> | |
| #include <sstream> | |
| using namespace std; |
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
| query tineline { | |
| timeline(filter: "everyone", limit: 10, offset: 0) { | |
| id | |
| timeline { | |
| id | |
| entityType | |
| entityId | |
| entity { | |
| __typename | |
| ... on User { |
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
| query timeLine { | |
| timeline(filter: "everyone") { | |
| id | |
| timeline { | |
| entityId | |
| entityType | |
| entity{ | |
| ...on User{ | |
| id | |
| avatar |
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
| query post{ | |
| post(id: 53){ | |
| id | |
| body | |
| postType | |
| created | |
| updated | |
| pinned | |
| commentCount |
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
| mutation createMessage{ | |
| createMessage(roomId:18, body:"Hi there how are you?", messageType: "default"){ | |
| id | |
| body | |
| messageType | |
| author{ | |
| id | |
| username | |
| avatar | |
| isOnline |
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
| query findFriends{ | |
| findFriends(search: "", limit:null, offset: null){ | |
| id | |
| firstName | |
| username | |
| avatar | |
| } | |
| } |