Skip to content

Instantly share code, notes, and snippets.

Nikolas nikolasburk

Block or report user

Report or block nikolasburk

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
View relay-vs-apollo.md
Relay Apollo
Built by Facebook (Check out the project on GitHub) Meteor (Check out the project on GitHub)
Frontend Technologies Requires React / React Native and configuration of Babel plugin Framework and platform agnostic (works with any JS framework such as React, Angular or Vue as well as on the native mobile platforms)
GraphQL API Requires a certain structure in the GraphQL schema Works with any GraphQL schema
Complexity Slow learning curve: Lots of powerful magic happening behind the scenes Low entrance barrier: Let's you get started quickly and involves more manual work for certain features
Flexibility Almost no flexibility, strict rules how to
View terms.md

The fine print.

This page contains a lot of legalese pertaining to policies and terms. It's all very formal but everything here is guided by the following principles:

Our Guiding Principles

  • Your data is safe.
  • You own your data.
  • Stability and uptime of the Graphcool cloud platform are paramount.
  • Graphcool is built by developers for developers. We will strive to make every interaction with Graphcool an easy and painless experience.
View index.d.ts
import { DMMF, DMMFClass, Engine } from './runtime';
/**
* Utility Types
*/
export declare type Enumerable<T> = T | Array<T>;
export declare type MergeTruthyValues<R extends object, S extends object> = {
[key in keyof S | keyof R]: key extends false ? never : key extends keyof S ? S[key] extends false ? never : S[key] : key extends keyof R ? R[key] : never;
};
export declare type CleanupNever<T> = {
[key in keyof T]: T[key] extends never ? never : key;
View github.graphql
"""Autogenerated input type of AcceptTopicSuggestion"""
input AcceptTopicSuggestionInput {
"""The Node ID of the repository."""
repositoryId: ID!
"""The name of the suggested topic."""
name: String!
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
View management.graphql
input AddProjectInput {
name: String!
stage: String!
secrets: [String!]
clientMutationId: String
}
type AddProjectPayload {
project: Project
clientMutationId: String
@nikolasburk
nikolasburk / instructions.md
Last active Aug 14, 2019
Use the Contentful GraphQL API inside a GraphQL Playground
View instructions.md

Use the Contentful GraphQL API inside a GraphQL Playground

The Contentful GraphQL API ships with GraphiQL by default. To get even better workflows (such as multiple tabs, speciyfing HTTP headers or work with multiple GraphQL APIs side-by-side), you can use a GraphQL Playground.

1. Get the endpoint for your Contentful GraphQL API

The endpoint of your Contentful GraphQL API has the following structure: https://cdn.contentful.com/spaces/{SPACE}/graphql/alpha/explore?access_token={CDA_TOKEN}

There are two placeholders that need to be replaced:

View index.js
const UserType = new GraphQLObjectType({
name: 'User',
fields: {
id: { type: GraphQLID },
name: { type: GraphQLString },
},
})
const schema = new GraphQLSchema({
query: new GraphQLObjectType({
View schema.graphql
type User {
id: ID!
name: String
}
type Query {
user(id: ID!): User
}
View express-graphql.js
// express-graphql
const app = express()
app.use('/graphql', graphqlHTTP({ schema }))
app.listen(4000, () => {
console.log(`Server ready at http://localhost:4000`)
})
View apollo-server.js
// apollo-server
const server = new ApolloServer({ schema })
server.listen({ port: 4000 }, () =>
console.log(`Server ready at http://localhost:4000`),
)
You can’t perform that action at this time.