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
{ | |
"name": "java-app", | |
"scripts": { | |
"postinstall": "graphql-codegen" | |
}, | |
"dependencies": { | |
"graphql": "14.2.1", | |
"@graphql-codegen/cli": "1.2.2-beta.0", | |
"@graphql-codegen/java-apollo-android": "1.2.2-beta.0" | |
} |
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
{ | |
"__schema": { | |
"queryType": { | |
"name": "Query" | |
}, | |
"mutationType": { | |
"name": "Mutation" | |
}, | |
"subscriptionType": null, | |
"types": [ |
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
type User { | |
profilePicture: String | |
} | |
type Mutation { | |
uploadProfilePicture(image: File!): User | |
} |
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 fetch = require('node-fetch'); | |
const fs = require('fs'); | |
fetch(`http://localhost:3002/graphql`, { | |
method: 'POST', | |
headers: { 'Content-Type': 'application/json' }, | |
body: JSON.stringify({ | |
variables: {}, | |
operationName: '', | |
query: ` |
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 { GraphQLModule } from '@graphql-modules/core'; | |
import { UserModule } from './user-module'; | |
import { ChatModule } from './chat-module'; | |
export const appModule = new GraphQLModule({ | |
imports: [ | |
UserModule, | |
ChatModule, | |
], | |
}); |
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 { ApolloClient, createNetworkInterface } = require('apollo-client'); | |
const gql = require('graphql-tag'); | |
const { makeExecutableSchema } = require('graphql-tools'); | |
const { find, filter } = require('lodash'); | |
const { execute } = require('graphql'); | |
// Schema | |
const typeDefinitions = ` | |
type Author { |
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 { Mongo } from 'meteor/mongo'; | |
import {Observable, Subscriber} from "rxjs"; | |
function toObservable<T>(cursor : Mongo.Cursor<T>) : Observable<T> { | |
return Observable.create((observer : Subscriber) => { | |
const handleChange = () => { | |
observer.next(cursor.fetch()); | |
}; | |
let handler = cursor.observe({ |
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
// app.ts | |
@Component({}) | |
@View({}) | |
class Main { | |
myData : Mongo.Cursor<any>; | |
constructor() { | |
this.myData = MyCollection.find({}); | |
} | |
} |
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
var MeteorPublisher = require('./lib/publisher'); | |
var _ = require('lodash'); | |
var version = '1.4.2'; // bower version | |
var depVersion = "1.4.2"; // atmosphere version | |
var packages = ['angular-animate', 'angular-sanitize', 'angular-touch', 'angular-scenario', 'angular-route', 'angular-resource', 'angular-mocks', 'angular-loader', 'angular-cookies', 'angular-messages','angular-aria']; // sub-packages, will depend on the original angular:angular package | |
var runNextPackage; | |
var basePackage = { |
NewerOlder