index
int64
0
0
repo_id
stringlengths
16
181
file_path
stringlengths
28
270
content
stringlengths
1
11.6M
__index_level_0__
int64
0
10k
0
petrpan-code/alephjs/aleph.js/framework
petrpan-code/alephjs/aleph.js/framework/react/data.ts
import type { FC, PropsWithChildren } from "react"; import { createElement, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react"; import { FetchError } from "../core/error.ts"; import type { RouteData } from "../core/router.ts"; import type { DataContextProps, HttpMethod, UpdateStrategy } from "...
7,400
0
petrpan-code/alephjs/aleph.js/framework
petrpan-code/alephjs/aleph.js/framework/react/error.ts
import type { FC, PropsWithChildren } from "react"; import { Component, createElement } from "react"; type ErrorBoundaryProps = PropsWithChildren<{ Handler: FC<{ error: Error }> }>; export class ErrorBoundary extends Component<ErrorBoundaryProps, { error: Error | null }> { constructor(props: ErrorBoundaryProps) { ...
7,401
0
petrpan-code/alephjs/aleph.js/framework
petrpan-code/alephjs/aleph.js/framework/react/head.ts
import type { FC, ReactNode } from "react"; import { Children, createElement, Fragment, isValidElement, useContext, useEffect, useMemo } from "react"; import { isFilledArray, isFilledString } from "../../shared/util.ts"; import { RouterContext } from "./context.ts"; export const Head: FC<{ children?: ReactNode }> = (p...
7,402
0
petrpan-code/alephjs/aleph.js/framework
petrpan-code/alephjs/aleph.js/framework/react/link.ts
import type { AnchorHTMLAttributes, CSSProperties, MouseEvent, MutableRefObject, PropsWithChildren } from "react"; import { createElement, useCallback, useEffect, useMemo, useRef } from "react"; import { cleanPath, isFilledString, isLikelyHttpURL, splitBy, trimSuffix } from "../../shared/util.ts"; import { prefetchModu...
7,403
0
petrpan-code/alephjs/aleph.js/framework
petrpan-code/alephjs/aleph.js/framework/react/mod.ts
export { bootstrap } from "./client.ts"; export { useData } from "./data.ts"; export { Head } from "./head.ts"; export { Link, type LinkProps, NavLink, type NavLinkProps } from "./link.ts"; export { usePortal } from "./portal.ts"; export { App, Router, type RouterProps, useRouter } from "./router.ts";
7,404
0
petrpan-code/alephjs/aleph.js/framework
petrpan-code/alephjs/aleph.js/framework/react/plugin.ts
import { createElement } from "react"; import { renderToReadableStream } from "react-dom/server"; import type { Plugin, SSRContext, SSROptions } from "../../server/types.ts"; import { isPlainObject, pick } from "../../shared/util.ts"; import { App } from "./router.ts"; /** The `suspenseMarker` to mark the susponse ren...
7,405
0
petrpan-code/alephjs/aleph.js/framework
petrpan-code/alephjs/aleph.js/framework/react/portal.ts
import type { ReactNode, ReactPortal } from "react"; import { useCallback, useContext, useEffect, useState } from "react"; import { RouterContext } from "./context.ts"; /** * The `usePortal` hook to create a portal node. * Please ensure to pass the `React.createPortal` in `Router` props. * * ```jsx * function...
7,406
0
petrpan-code/alephjs/aleph.js/framework
petrpan-code/alephjs/aleph.js/framework/react/refresh.ts
/** @format */ // react-refresh // @link https://github.com/facebook/react/issues/16604#issuecomment-528663101 import runtime from "https://esm.sh/v126/react-refresh@0.14.0/runtime"; let timer: number | null; const refresh = () => { if (timer !== null) { clearTimeout(timer); } timer = setTimeout(() => { ...
7,407
0
petrpan-code/alephjs/aleph.js/framework
petrpan-code/alephjs/aleph.js/framework/react/router.ts
import type { FC, ReactNode } from "react"; import { createElement, isValidElement, StrictMode, Suspense, useContext, useEffect, useMemo, useState } from "react"; import type { SSRContext } from "../../server/types.ts"; import { redirect } from "../core/redirect.ts"; import type { CSRContext, RouteData, RouteModule } f...
7,408
0
petrpan-code/alephjs/aleph.js
petrpan-code/alephjs/aleph.js/plugins/deploy.ts
import { colors, esbuild, path } from "../server/deps.ts"; import type { Router } from "../framework/core/router.ts"; import depGraph, { DependencyGraph } from "../server/graph.ts"; import log from "../server/log.ts"; import { fetchCode, getAlephConfig, getAlephPkgUri, getAppDir, getImportMap, getJSXConfig } from "../s...
7,409
0
petrpan-code/alephjs/aleph.js
petrpan-code/alephjs/aleph.js/plugins/mdx.ts
/** @format */ import { compile, type CompileOptions } from "https://esm.sh/v126/@mdx-js/mdx@2.3.0"; import type { ModuleLoader, ModuleLoaderEnv, ModuleLoaderOutput, Plugin } from "../server/types.ts"; export class MDXLoader implements ModuleLoader { #options: CompileOptions; constructor(options?: CompileOptions...
7,410
0
petrpan-code/alephjs/aleph.js
petrpan-code/alephjs/aleph.js/plugins/unocss.ts
import { createGenerator, type UserConfig } from "@unocss/core"; import type { AtomicCSSEngine, Plugin } from "../server/types.ts"; export type UnoConfig = UserConfig & { test?: RegExp; resetCSS?: boolean }; export function UnoCSS(config?: UnoConfig): AtomicCSSEngine { if (!Array.isArray(config?.presets)) { thr...
7,411
0
petrpan-code/alephjs/aleph.js
petrpan-code/alephjs/aleph.js/server/build.ts
import { cleanPath, isLikelyHttpURL, splitBy, trimPrefix } from "../shared/util.ts"; import { colors, path, TransformCSSOptions } from "./deps.ts"; import { ensureDir, esbuild, transformCSS } from "./deps.ts"; import depGraph from "./graph.ts"; import { builtinModuleExts, existsDir, existsFile, fetchCode, get...
7,412
0
petrpan-code/alephjs/aleph.js
petrpan-code/alephjs/aleph.js/server/cache.ts
import { computeHash, isFilledString, trimSuffix, utf8Dec } from "../shared/util.ts"; import { path } from "./deps.ts"; import { existsDir, existsFile } from "./helpers.ts"; import log from "./log.ts"; type CacheMeta = { url: string; headers: Record<string, string>; now: { secs_since_epoch: number; nanos...
7,413
0
petrpan-code/alephjs/aleph.js
petrpan-code/alephjs/aleph.js/server/context.ts
import { computeHash, hmacSign, splitBy } from "../shared/util.ts"; import { SessionImpl } from "./session.ts"; import type { ConnInfo, Context, HTMLRewriterHandlers, Session, SessionOptions } from "./types.ts"; export const NEXT = Symbol(); export const CUSTOM_HTML_REWRITER = Symbol(); export type ContextInit = { ...
7,414
0
petrpan-code/alephjs/aleph.js
petrpan-code/alephjs/aleph.js/server/deps.ts
/** @format */ // deno std export { concat as concatBytes } from "https://deno.land/std@0.192.0/bytes/mod.ts"; export { encode as btoa } from "https://deno.land/std@0.192.0/encoding/base64.ts"; export * as colors from "https://deno.land/std@0.192.0/fmt/colors.ts"; export { ensureDir } from "https://deno.land/std@0.192...
7,415
0
petrpan-code/alephjs/aleph.js
petrpan-code/alephjs/aleph.js/server/dev.ts
/** @format */ import { isFilledString } from "../shared/util.ts"; import { colors, Emitter, ensureDir, mitt, parseCliArgs, parseDeps, path } from "./deps.ts"; import depGraph from "./graph.ts"; import { builtinModuleExts, findFile, getAlephConfig, getImportMap, watchFs } from "./helpers.ts"; import log from "./log.ts...
7,416
0
petrpan-code/alephjs/aleph.js
petrpan-code/alephjs/aleph.js/server/graph.ts
export type Module = { readonly specifier: string; readonly version: number; readonly deps?: ReadonlyArray<DependencyDescriptor>; readonly inlineCSS?: string; }; export type DependencyDescriptor = { readonly specifier: string; readonly dynamic?: boolean; }; export class DependencyGraph { #modules = new ...
7,417
0
petrpan-code/alephjs/aleph.js
petrpan-code/alephjs/aleph.js/server/handler.ts
import { generateErrorHtml, TransformError } from "../framework/core/error.ts"; import type { Router } from "../framework/core/router.ts"; import { isPlainObject, trimSuffix } from "../shared/util.ts"; import { createContext, NEXT } from "./context.ts"; import { handleHMR } from "./dev.ts"; import { HTMLRewriter, path ...
7,418
0
petrpan-code/alephjs/aleph.js
petrpan-code/alephjs/aleph.js/server/helpers.ts
/** @format */ import { isFilledArray, isFilledString, isLikelyHttpURL, isPlainObject, trimSuffix } from "../shared/util.ts"; import { isCanary, VERSION } from "../version.ts"; import { cacheFetch } from "./cache.ts"; import { jsonc, path, type TransformOptions } from "./deps.ts"; import log from "./log.ts"; import { ...
7,419
0
petrpan-code/alephjs/aleph.js
petrpan-code/alephjs/aleph.js/server/html.ts
import { cleanPath, isLikelyHttpURL, utf8Enc } from "../shared/util.ts"; import { concatBytes, HTMLRewriter, initLolHtml, lolHtmlWasm } from "./deps.ts"; import { existsFile, getAlephPkgUri, getDeploymentId, toLocalPath } from "./helpers.ts"; import log from "./log.ts"; type LoadOptions = { ssr?: { root?: string }; ...
7,420
0
petrpan-code/alephjs/aleph.js
petrpan-code/alephjs/aleph.js/server/log.ts
import { colors } from "./deps.ts"; export type LevelName = "debug" | "info" | "warn" | "error"; export enum Level { Debug = 0, Info = 1, Warn = 2, Error = 3, } export class Logger { #level: Level = Level.Info; get level(): Level { return this.#level; } setLevel(level: LevelName): void { sw...
7,421
0
petrpan-code/alephjs/aleph.js
petrpan-code/alephjs/aleph.js/server/media_type.ts
import { splitBy, trimPrefix } from "../shared/util.ts"; // MIME types for web const mimeTypes: Record<string, string[]> = { // application "application/javascript": ["js", "mjs"], "application/typescript": ["ts", "mts"], "application/wasm": ["wasm"], "application/json": ["json", "map"], "application/jsonc...
7,422
0
petrpan-code/alephjs/aleph.js
petrpan-code/alephjs/aleph.js/server/mock.ts
import type { Router } from "../framework/core/router.ts"; import { isPlainObject } from "../shared/util.ts"; import { createContext, NEXT } from "./context.ts"; import { path } from "./deps.ts"; import { getAppDir } from "./helpers.ts"; import { createHtmlResponse, loadIndexHtml } from "./html.ts"; import renderer fro...
7,423
0
petrpan-code/alephjs/aleph.js
petrpan-code/alephjs/aleph.js/server/mod.ts
import { serve as stdServe, serveTls } from "./deps.ts"; import { createHandler } from "./handler.ts"; import log, { type LevelName } from "./log.ts"; import { build } from "./build.ts"; import { watch } from "./dev.ts"; import { getAppDir } from "./helpers.ts"; import type { AlephConfig, ServeInit } from "./types.ts";...
7,424
0
petrpan-code/alephjs/aleph.js
petrpan-code/alephjs/aleph.js/server/renderer.ts
import { FetchError } from "../framework/core/error.ts"; import { matchRoutes, type RouteModule, type Router } from "../framework/core/router.ts"; import { cleanPath, isFilledString, isPlainObject, utf8Enc } from "../shared/util.ts"; import { CUSTOM_HTML_REWRITER } from "./context.ts"; import { HTMLRewriter, path } fro...
7,425
0
petrpan-code/alephjs/aleph.js
petrpan-code/alephjs/aleph.js/server/router.ts
import { URLPatternCompat, type URLPatternInput } from "../framework/core/url_pattern.ts"; import type { RouteMatch, RouteMeta, RoutePattern, Router } from "../framework/core/router.ts"; import { cleanPath, isFilledString, isPlainObject, splitBy, splitPath, trimPrefix, trimSuffix, unique, } from "../sha...
7,426
0
petrpan-code/alephjs/aleph.js
petrpan-code/alephjs/aleph.js/server/session.ts
import { cookieHeader } from "./helpers.ts"; import type { Session, SessionOptions, SessionStorage } from "./types.ts"; export class MemorySessionStorage implements SessionStorage { #store: Map<string, [Record<string, unknown>, number]> = new Map(); get(sid: string): Promise<Record<string, unknown> | undefined> {...
7,427
0
petrpan-code/alephjs/aleph.js
petrpan-code/alephjs/aleph.js/server/transformer.ts
import { TransformError } from "../framework/core/error.ts"; import { isLikelyHttpURL, splitBy, trimPrefix } from "../shared/util.ts"; import type { TransformResult } from "./deps.ts"; import { btoa, parseDeps, transform } from "./deps.ts"; import depGraph from "./graph.ts"; import { builtinModuleExts, fetchCode, ...
7,428
0
petrpan-code/alephjs/aleph.js
petrpan-code/alephjs/aleph.js/server/types.ts
import type { ConnInfo, ServeInit } from "https://deno.land/std@0.180.0/http/server.ts"; import type { Comment, Element, TextChunk } from "https://deno.land/x/lol_html@0.0.6/types.d.ts"; import type { RouteModule } from "../framework/core/router.ts"; export type AlephConfig = { /** The TLS options. */ tls?: TLSOpt...
7,429
0
petrpan-code/alephjs/aleph.js
petrpan-code/alephjs/aleph.js/shared/util.ts
export const utf8Enc = new TextEncoder(); export const utf8Dec = new TextDecoder(); export function assertString(s: unknown): asserts s is string { if (typeof s !== "string") { throw new Error("assert string failed"); } } export function isFilledString(a: unknown): a is string { return typeof a === "string"...
7,430
0
petrpan-code/alephjs/aleph.js
petrpan-code/alephjs/aleph.js/tests/integration_api_app_test.ts
import { assertEquals } from "std/testing/asserts.ts"; import { mockFormData, MockServer } from "aleph/server/mock.ts"; Deno.test("[integration] examples/api-app", async (t) => { const api = new MockServer({ appDir: "./examples/api-app", router: { glob: "./routes/**/*.ts", }, origin: "https://a...
7,431
0
petrpan-code/alephjs/aleph.js
petrpan-code/alephjs/aleph.js/tests/integration_react_app_test.tsx
import { assertEquals, assertStringIncludes } from "std/testing/asserts.ts"; import { MockServer } from "aleph/server/mock.ts"; import { render } from "aleph/framework/react/plugin.ts"; Deno.test("[integration] examples/react-app", async (t) => { const api = new MockServer({ appDir: "./examples/react-app", r...
7,432
0
petrpan-code/alephjs/aleph.js
petrpan-code/alephjs/aleph.js/tests/server_helpers_test.ts
import { assertEquals } from "std/testing/asserts.ts"; import { MagicString, restoreUrl, toLocalPath } from "../server/helpers.ts"; import { parseDeps } from "../server/deps.ts"; Deno.test("server/helper.ts", async (t) => { await t.step("toLocalPath", () => { assertEquals(toLocalPath("https://foo.com/lib@0.1.0?a...
7,433
0
petrpan-code/alephjs/aleph.js
petrpan-code/alephjs/aleph.js/tests/server_html_test.ts
import { assertEquals } from "std/testing/asserts.ts"; import { parseHtmlLinks } from "../server/html.ts"; Deno.test("[unit] lib/html.ts: parseHtmlLinks", async () => { const html = `<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial...
7,434
0
petrpan-code/alephjs/aleph.js
petrpan-code/alephjs/aleph.js/tests/server_media_type_test.ts
import { assertEquals } from "std/testing/asserts.ts"; import { getContentType } from "../server/media_type.ts"; Deno.test("[unit] server/media_type.ts: getContentType", () => { assertEquals(getContentType("/mod.ts"), "application/typescript"); assertEquals(getContentType("/mod.tsx"), "text/tsx"); assertEquals(g...
7,435
0
petrpan-code/alephjs/aleph.js
petrpan-code/alephjs/aleph.js/tests/server_routing_test.ts
import { assertEquals } from "std/testing/asserts.ts"; import { dirname, join } from "std/path/mod.ts"; import { matchRoutes } from "../framework/core/router.ts"; import { initRouter } from "../server/router.ts"; Deno.test("[unit] server/router.ts: matchRoutes", async () => { const tmpDir = await Deno.makeTempDir();...
7,436
0
petrpan-code/alephjs/aleph.js
petrpan-code/alephjs/aleph.js/tests/shared_util_test.ts
import { assertEquals } from "std/testing/asserts.ts"; import { cleanPath, isLikelyHttpURL, prettyBytes, splitBy, trimPrefix, trimSuffix } from "../shared/util.ts"; Deno.test("[unit] shared/util.ts", async (t) => { await t.step("isLikelyHttpURL", () => { assertEquals(isLikelyHttpURL("https://deno.land"), true); ...
7,437
0
petrpan-code/learnapollo
petrpan-code/learnapollo/learnapollo/.babelrc
{ "presets": [ ["es2015", {"modules": false}], "react", "stage-0" ], "plugins": [ "transform-runtime", "react-relay" ], "env": { "development": { "presets": [ "react-hmre" ] }, "production": { "plugins": [ "transform-react-remove-prop-types", ...
7,438
0
petrpan-code/learnapollo
petrpan-code/learnapollo/learnapollo/CONTRIBUTING.md
# How to contribute to Learn Apollo We're glad that you are interested in contributing to Learn Apollo! :tada: ## Contributing to the interactive guide If you have a suggestion on how to improve Learn Apollo please either [open an issue](https://github.com/learnapollo/learnapollo/issues/new) or create a pull request...
7,439
0
petrpan-code/learnapollo
petrpan-code/learnapollo/learnapollo/LICENSE
MIT License Copyright (c) 2016 Learn Apollo Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, dist...
7,440
0
petrpan-code/learnapollo
petrpan-code/learnapollo/learnapollo/README.md
# Learn Apollo ![](https://learnapollo.org/images/twitter.png) Source code for [Learn Apollo](https://learnapollo.com) ## Contribution If you have a suggestion on how to improve Learn Apollo please either [open an issue](https://github.com/learnapollo/learnapollo/issues/new) or create a pull request by changing the...
7,441
0
petrpan-code/learnapollo
petrpan-code/learnapollo/learnapollo/circle.yml
machine: node: version: 6 dependencies: override: - npm install -g yarn prep - yarn test: override: - echo 'No tests yet' deployment: surge: branch: [master, dev] commands: - npm run deploy
7,442
0
petrpan-code/learnapollo
petrpan-code/learnapollo/learnapollo/custom.d.ts
declare module 'react-prism' declare module 'react-router' declare module 'react-router-relay' declare module 'react-router-scroll' declare module 'commonmark-react-renderer' declare module 'graphiql' declare module 'react-copy-to-clipboard' declare module 'cuid' declare var Smooch: any declare var __LAST_UPDATE__: st...
7,443
0
petrpan-code/learnapollo
petrpan-code/learnapollo/learnapollo/package.json
{ "name": "learnapollo", "private": true, "graphql": { "request": { "url": "https://api.graph.cool/relay/v1/ciwjew0qz0l8d0122v7smvmxu" } }, "dependencies": { "@types/classnames": "^0.0.32", "@types/commonmark": "^0.22.29", "@types/immutable": "^3.8.7", "@types/js-cookie": "^2.0.2...
7,444
0
petrpan-code/learnapollo
petrpan-code/learnapollo/learnapollo/prep.ts
import './src/polyfill' import { chapters } from './src/utils/content' export default () => { const chapterRoutes = chapters .reduce((acc, c) => acc.concat(c.subchapters.map((s) => `/${c.alias}/${s.alias}`)), []) return { routes: chapterRoutes.concat(['/']), https: true, concurrency: 50, timeo...
7,445
0
petrpan-code/learnapollo
petrpan-code/learnapollo/learnapollo/tsconfig.json
{ "compilerOptions": { "removeComments": true, "preserveConstEnums": true, "strictNullChecks": true, "jsx": "react", "pretty": true, "sourceMap": true, "target": "es2015", "outDir": "lib", "moduleResolution": "node" }, "exclude": [ "node_modules", "dist" ], "include...
7,446
0
petrpan-code/learnapollo
petrpan-code/learnapollo/learnapollo/tslint.json
{ "extends": [ "tslint-config-standard" ], "rules": { "trailing-comma": [ true, { "multiline": "always", "singleline": "never" } ] } }
7,447
0
petrpan-code/learnapollo
petrpan-code/learnapollo/learnapollo/webpack.config.build.js
const webpack = require('webpack') const cssnano = require('cssnano') const HtmlWebpackPlugin = require('html-webpack-plugin') module.exports = { entry: { app: ['whatwg-fetch', './src'], css: 'tachyons', }, output: { path: './dist', filename: '[name].[hash].js', publicPath: '/', }, module...
7,448
0
petrpan-code/learnapollo
petrpan-code/learnapollo/learnapollo/webpack.config.js
const webpack = require('webpack') const HtmlWebpackPlugin = require('html-webpack-plugin') module.exports = { devtool: 'cheap-module-eval-source-map', entry: { app: ['whatwg-fetch', './src'], css: 'tachyons', }, output: { filename: '[name].[hash].js', publicPath: '/', }, module: { rule...
7,449
0
petrpan-code/learnapollo
petrpan-code/learnapollo/learnapollo/yarn.lock
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. # yarn lockfile v1 "@types/classnames@^0.0.32": version "0.0.32" resolved "https://registry.yarnpkg.com/@types/classnames/-/classnames-0.0.32.tgz#449abcd9a826807811ef101e58df9f83cfc61713" "@types/commonmark@^0.22.29": version "0.22.29" resolved...
7,450
0
petrpan-code/learnapollo/learnapollo/content
petrpan-code/learnapollo/learnapollo/content/excursions/excursion-01.md
# Excursion 01 - Using the Redux DevTools This is a planned excursion. Here, you should learn how to use the Redux DevTools in combination with Apollo Client to reason about updates to the Apollo Store. If you would like to contribute to Learn Apollo by working on this excursion, head over to [GitHub](http://github.c...
7,451
0
petrpan-code/learnapollo/learnapollo/content
petrpan-code/learnapollo/learnapollo/content/excursions/excursion-02.md
# Excursion 02 - Managing Apollo store Apart from executing queries and mutations, Apollo Client takes care of caching query and mutation results in a client-side store. Let's explore the caching mechanisms encountered in Apollo Client and its React integration. ## Default caching behaviour With the correct setup, d...
7,452
0
petrpan-code/learnapollo/learnapollo/content
petrpan-code/learnapollo/learnapollo/content/go-further/wrap-up.md
# Well done 🎉 <iframe width="560" height="315" src="https://www.youtube.com/embed/lMTJn-onrr8?list=PLn2e1F9Rfr6neWxkWtlTAwshh07-m1p5I" frameborder="0" allowfullscreen></iframe> <!-- __INJECT_SHARING__ -->
7,453
0
petrpan-code/learnapollo/learnapollo/content
petrpan-code/learnapollo/learnapollo/content/introduction/get-started-bottom.md
## Choose your Tutorial Track Now that you got your own GraphQL server, let's get familiar with the general structure of an exercise. Each exercise is based on a feature-oriented **goal**, like the possibility to list all pokemons or to add a new pokemon. You can follow along the several **steps** that are provided t...
7,454
0
petrpan-code/learnapollo/learnapollo/content
petrpan-code/learnapollo/learnapollo/content/introduction/get-started.md
# Introduction Welcome to *Learn Apollo*, a hands-on tutorial for Apollo Client where you take a journey from a basic starter-kit application to a complete pokedex application! <iframe width="560" height="315" src="https://www.youtube.com/embed/UNoHVLrItXQ?list=PLn2e1F9Rfr6neWxkWtlTAwshh07-m1p5I" frameborder="0" allo...
7,455
0
petrpan-code/learnapollo/learnapollo/content
petrpan-code/learnapollo/learnapollo/content/tutorial-angular/angular-playground.md
# Angular 2 Playground Right now, we only have a playground for Angular 2. Download the app, read the code and play around a bit! If you would like to contribute to Learn Apollo by adding more features to the Angular 2 app, such as a detailed pokemon card or the ability to add new pokemons, head over to [GitHub](http...
7,456
0
petrpan-code/learnapollo/learnapollo/content
petrpan-code/learnapollo/learnapollo/content/tutorial-ios/ios-01.md
# Getting Started - iOS Tutorial (1/6) Welcome to the 1st exercise in the **iOS** Track of this Apollo Client Tutorial! If you prefer React, React Native, Angular 2 or Vue.js over iOS, head over to the respective tutorial track. > Note: This tutorial assumes a basic familiarity with GraphQL and focusses on functional...
7,457
0
petrpan-code/learnapollo/learnapollo/content
petrpan-code/learnapollo/learnapollo/content/tutorial-ios/ios-02.md
# Basic Queries - iOS Tutorial (2/6) This is the 2nd exercise in the **iOS Track** of this Apollo Client Tutorial! ## Goal The **goal** of this exercise is to query information on your very own trainer node. We will use it to add a personal touch to the greeting in our pokedex: !["Pokedex with personalized greeting...
7,458
0
petrpan-code/learnapollo/learnapollo/content
petrpan-code/learnapollo/learnapollo/content/tutorial-ios/ios-03.md
# Advanced Queries - iOS Tutorial (3/6) This is the 3rd exercise in the **iOS Track** of this Apollo Client Tutorial! ## Goal In this exercise we will have a look at advanced query features with the **goal** of showing a list of pokemon that the trainer owns: !["Display owned Pokemons"](../images/ios-ex03-final.png...
7,459
0
petrpan-code/learnapollo/learnapollo/content
petrpan-code/learnapollo/learnapollo/content/tutorial-ios/ios-04.md
# Fragments - iOS Tutorial (4/6) Welcome to the 4th exercise in the **iOS Track** of this Apollo Client Tutorial! ## Goal In this exercise, our **goal** is to display a _detail view_ for a Pokemon when the user selects it in the table view. Therefore, we are going to learn about a new GraphQL feature that allows us...
7,460
0
petrpan-code/learnapollo/learnapollo/content
petrpan-code/learnapollo/learnapollo/content/tutorial-ios/ios-05.md
# Basic Mutations - iOS Tutorial (5/6) Welcome to the 5th exercise in the **iOS Track** of this Apollo Client Tutorial! ## Goal In this exercise, our **goal** is to add new Pokemons to the Pokedex. Therefore, we are going to learn about GraqhQL _mutations_. ## Introduction Open the directory that contains the 5t...
7,461
0
petrpan-code/learnapollo/learnapollo/content
petrpan-code/learnapollo/learnapollo/content/tutorial-ios/ios-06.md
# Multiple Mutations - iOS Tutorial (6/6) Welcome to the 6th and last exercise in the **iOS Track** of this Apollo Client Tutorial! ## Goal The **goal** of this exercise is to implement features for updating and deleting existing Pokemons from the Pokedex. This will give you more familiarity with using mutations. ...
7,462
0
petrpan-code/learnapollo/learnapollo/content
petrpan-code/learnapollo/learnapollo/content/tutorial-react-native/react-native-01.md
# Getting Started - React-Native Tutorial (1/6) Welcome to the first exercise in the **React Native Track** of this Apollo Client Tutorial! The example project will be based on [create-react-native-app](https://github.com/react-community/create-react-native-app/) and [Expo](https://expo.io/). > There is also a ["norm...
7,463
0
petrpan-code/learnapollo/learnapollo/content
petrpan-code/learnapollo/learnapollo/content/tutorial-react-native/react-native-02.md
# Basic Queries - React-Native Tutorial (2/6) This is the second exercise in the **React Native Track** of this Apollo Client Tutorial! <iframe width="560" height="315" src="https://www.youtube.com/embed/Mds3w8ebudM" frameborder="0" allowfullscreen></iframe> ## Goal The **goal** of this exercise is to query inform...
7,464
0
petrpan-code/learnapollo/learnapollo/content
petrpan-code/learnapollo/learnapollo/content/tutorial-react-native/react-native-03.md
# Advanced Queries - React-Native Tutorial (3/6) This is the third exercise in the **React Native Track** of this Apollo Client Tutorial! <iframe width="560" height="315" src="https://www.youtube.com/embed/e4jZ1TUSC1Q" frameborder="0" allowfullscreen></iframe> ## Goal In this exercise we will have a look at advan...
7,465
0
petrpan-code/learnapollo/learnapollo/content
petrpan-code/learnapollo/learnapollo/content/tutorial-react-native/react-native-04.md
# Fragments - React-Native Tutorial (4/6) Welcome to the 4th exercise in the **React Native Track** of this Apollo Client Tutorial! ## Goal The **goal** of this exercise is to add some information to the pokemon detail view about the pokemon's trainer: ![](../images/react-native-exercise-04-pokemonpage.png) We wi...
7,466
0
petrpan-code/learnapollo/learnapollo/content
petrpan-code/learnapollo/learnapollo/content/tutorial-react-native/react-native-05.md
# Basic Mutations - React-Native Tutorial (5/6) Welcome to the 5th exercise in the **React Native Track** of this Apollo Client Tutorial! ## Goal In this exercise we have the **goal** of adding the possibility to create new pokemons: ![](../images/react-native-exercise-05-addpokemon.png) A button in the pokedex w...
7,467
0
petrpan-code/learnapollo/learnapollo/content
petrpan-code/learnapollo/learnapollo/content/tutorial-react-native/react-native-06.md
# Multiple Mutations - React-Native Tutorial (6/6) Welcome to the 6th exercise in the **React Native Track** of this Apollo Client Tutorial! ## Goal The **goal** of this exercise is to add the possibility to update and delete existing pokemons: ![](../images/react-native-exercise-06-pokemonpage.png) This will bot...
7,468
0
petrpan-code/learnapollo/learnapollo/content
petrpan-code/learnapollo/learnapollo/content/tutorial-react/react-01.md
# Getting Started - React Tutorial (1/7) Welcome to the first exercise in the **React Track** of this Apollo Client Tutorial! If you prefer React Native, Angular 2 or Vue.js over React, head over to the respective tutorial track. <iframe width="560" height="315" src="https://www.youtube.com/embed/TiqPHEzSOg0?list=PLn...
7,469
0
petrpan-code/learnapollo/learnapollo/content
petrpan-code/learnapollo/learnapollo/content/tutorial-react/react-02.md
# Basic Queries - React Tutorial (2/7) This is the second exercise in the **React Track** of this Apollo Client Tutorial! <iframe width="560" height="315" src="https://www.youtube.com/embed/Mds3w8ebudM?list=PLn2e1F9Rfr6neWxkWtlTAwshh07-m1p5I" frameborder="0" allowfullscreen></iframe> ## Goal The **goal** of this ex...
7,470
0
petrpan-code/learnapollo/learnapollo/content
petrpan-code/learnapollo/learnapollo/content/tutorial-react/react-03.md
# Advanced Queries - React Tutorial (3/7) This is the third exercise in the **React Track** of this Apollo Client Tutorial! <iframe width="560" height="315" src="https://www.youtube.com/embed/e4jZ1TUSC1Q?list=PLn2e1F9Rfr6neWxkWtlTAwshh07-m1p5I" frameborder="0" allowfullscreen></iframe> ## Goal In this exercise we w...
7,471
0
petrpan-code/learnapollo/learnapollo/content
petrpan-code/learnapollo/learnapollo/content/tutorial-react/react-04.md
# Fragments - React Tutorial (4/7) Welcome to the 4th exercise in the **React Track** of this Apollo Client Tutorial! <iframe width="560" height="315" src="https://www.youtube.com/embed/NskpYO6Vneo?list=PLn2e1F9Rfr6neWxkWtlTAwshh07-m1p5I" frameborder="0" allowfullscreen></iframe> ## Goal The **goal** of this exerci...
7,472
0
petrpan-code/learnapollo/learnapollo/content
petrpan-code/learnapollo/learnapollo/content/tutorial-react/react-05.md
# Basic Mutations - React Tutorial (5/7) Welcome to the 5th exercise in the **React Track** of this Apollo Client Tutorial! <iframe width="560" height="315" src="https://www.youtube.com/embed/ZXvBmA-hKwc?list=PLn2e1F9Rfr6neWxkWtlTAwshh07-m1p5I" frameborder="0" allowfullscreen></iframe> ## Goal In this exercise we h...
7,473
0
petrpan-code/learnapollo/learnapollo/content
petrpan-code/learnapollo/learnapollo/content/tutorial-react/react-06.md
# Multiple Mutations - React Tutorial (6/7) Welcome to the 6th exercise in the **React Track** of this Apollo Client Tutorial! <iframe width="560" height="315" src="https://www.youtube.com/embed/mOS6WDixs8A?list=PLn2e1F9Rfr6neWxkWtlTAwshh07-m1p5I" frameborder="0" allowfullscreen></iframe> ## Goal The **goal** of th...
7,474
0
petrpan-code/learnapollo/learnapollo/content
petrpan-code/learnapollo/learnapollo/content/tutorial-react/react-07.md
# Pagination - React Tutorial (7/7) Welcome to the 7th exercise in the **React Track** of this Apollo Client Tutorial! <iframe width="560" height="315" src="https://www.youtube.com/embed/xloj6Rh3R54?list=PLn2e1F9Rfr6neWxkWtlTAwshh07-m1p5I" frameborder="0" allowfullscreen></iframe> ## Goal The **goal** in this exerc...
7,475
0
petrpan-code/learnapollo/learnapollo/content
petrpan-code/learnapollo/learnapollo/content/tutorial-vue/vue-playground.md
# Vue.js Playground Right now, we only have a playground for Vue.js. Download the app, read the code and play around a bit! If you would like to contribute to Learn Apollo by adding more features to the Vue.js app, such as a detailed pokemon card or the ability to add new pokemons, head over to [GitHub](http://github...
7,476
0
petrpan-code/learnapollo/learnapollo
petrpan-code/learnapollo/learnapollo/src/index.html
<!doctype html> <html lang="en"> <head> <title>Learn Apollo | Hands-on GraphQL Tutorial</title> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta property="og:type" content="website" /> <meta property="og:t...
7,477
0
petrpan-code/learnapollo/learnapollo
petrpan-code/learnapollo/learnapollo/src/index.tsx
import * as React from 'react' // tslint:disable-line import * as ReactDOM from 'react-dom' import { Router, browserHistory, applyRouterMiddleware } from 'react-router' import { useScroll } from 'react-router-scroll' import routes from './routes' import * as ReactGA from 'react-ga' import { events } from './utils/event...
7,478
0
petrpan-code/learnapollo/learnapollo
petrpan-code/learnapollo/learnapollo/src/polyfill.ts
interface Array<T> { find(predicate: (search: T) => boolean): T findIndex(predicate: (search: T) => boolean): number includes(search: T): boolean } if (!Array.prototype.find) { Array.prototype.find = function (predicate) { if (this == null) { throw new TypeError('Array.prototype.find called on null o...
7,479
0
petrpan-code/learnapollo/learnapollo
petrpan-code/learnapollo/learnapollo/src/routes.tsx
import * as React from 'react' // tslint:disable-line import {Route} from 'react-router' import MarkdownPage from './pages/markdown/MarkdownPage' import LandingPage from './pages/landing/LandingPage' import App from './components/App/App' import {subchapters} from './utils/content' export default ( <Route component=...
7,480
0
petrpan-code/learnapollo/learnapollo/src/assets
petrpan-code/learnapollo/learnapollo/src/assets/icons/chat.svg
<svg width="36px" height="35px" viewBox="0 3 36 35" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <!-- Generator: Sketch 39.1 (31720) - http://www.bohemiancoding.com/sketch --> <desc>Created with Sketch.</desc> <defs> <polygon id="path-1" points="0 35 3...
7,481
0
petrpan-code/learnapollo/learnapollo/src/assets
petrpan-code/learnapollo/learnapollo/src/assets/icons/check.svg
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg width="21px" height="21px" viewBox="0 0 21 21" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <!-- Generator: Sketch 39.1 (31720) - http://www.bohemiancoding.com/sketch --> <title>Group 4</title> <desc>...
7,482
0
petrpan-code/learnapollo/learnapollo/src/assets
petrpan-code/learnapollo/learnapollo/src/assets/icons/check_chapter.svg
<?xml version="1.0" encoding="utf-8"?> <!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="50px" height="50px" viewBox="0 0 50 50" style="enab...
7,483
0
petrpan-code/learnapollo/learnapollo/src/assets
petrpan-code/learnapollo/learnapollo/src/assets/icons/close.svg
<?xml version="1.0" encoding="utf-8"?> <!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="50px" height="50px" viewBox="0 0 50 50" style="enab...
7,484
0
petrpan-code/learnapollo/learnapollo/src/assets
petrpan-code/learnapollo/learnapollo/src/assets/icons/copy.svg
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg width="18px" height="18px" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <!-- Generator: Sketch 39.1 (31720) - http://www.bohemiancoding.com/sketch --> <title>Page 1</title> <desc>C...
7,485
0
petrpan-code/learnapollo/learnapollo/src/assets
petrpan-code/learnapollo/learnapollo/src/assets/icons/delete.svg
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg width="17px" height="18px" viewBox="0 0 17 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <!-- Generator: Sketch 39.1 (31720) - http://www.bohemiancoding.com/sketch --> <title>Group 15</title> <desc...
7,486
0
petrpan-code/learnapollo/learnapollo/src/assets
petrpan-code/learnapollo/learnapollo/src/assets/icons/github.svg
<?xml version="1.0" encoding="utf-8"?> <!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="50px" height="50px" viewBox="0 0 50 50" style="enab...
7,487
0
petrpan-code/learnapollo/learnapollo/src/assets
petrpan-code/learnapollo/learnapollo/src/assets/icons/graph-logo.svg
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg width="22px" height="24px" viewBox="0 0 22 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <!-- Generator: Sketch 39.1 (31720) - http://www.bohemiancoding.com/sketch --> <title>Group 10</title> <desc...
7,488
0
petrpan-code/learnapollo/learnapollo/src/assets
petrpan-code/learnapollo/learnapollo/src/assets/icons/graphcool-logo.svg
<?xml version="1.0" encoding="UTF-8"?> <svg width="35px" height="40px" viewBox="0 0 35 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <!-- Generator: Sketch 41.2 (35397) - http://www.bohemiancoding.com/sketch --> <title>Logo - Graphcool</title> <desc>Created...
7,489
0
petrpan-code/learnapollo/learnapollo/src/assets
petrpan-code/learnapollo/learnapollo/src/assets/icons/logo-angular.svg
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg width="256px" height="272px" viewBox="0 0 256 272" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid"> <g> <path d="M0.0996108949,45.522179 L125.908171,0.697276265 L255.103502,44.725291...
7,490
0
petrpan-code/learnapollo/learnapollo/src/assets
petrpan-code/learnapollo/learnapollo/src/assets/icons/logo-expo.svg
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg width="256px" height="240px" viewBox="0 0 256 240" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid"> <g> <path d="M94.104,-0.001 L0,217.125 L42.193,239.644 L128,55.703 L213.5...
7,491
0
petrpan-code/learnapollo/learnapollo/src/assets
petrpan-code/learnapollo/learnapollo/src/assets/icons/logo-ios.svg
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg width="256px" height="163px" viewBox="0 0 256 163" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid"> <g fill="#000000"> <path d="M9.463808,13.26432 C9.463808,16.065984 7.757824,18.138...
7,492
0
petrpan-code/learnapollo/learnapollo/src/assets
petrpan-code/learnapollo/learnapollo/src/assets/icons/logo-react.svg
<?xml version="1.0" encoding="UTF-8"?> <svg width="69px" height="65px" viewBox="0 0 69 65" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <!-- Generator: Sketch 41.2 (35397) - http://www.bohemiancoding.com/sketch --> <title>Group 3</title> <desc>Created with Ske...
7,493
0
petrpan-code/learnapollo/learnapollo/src/assets
petrpan-code/learnapollo/learnapollo/src/assets/icons/logo-vue.svg
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg width="256px" height="221px" viewBox="0 0 256 221" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid"> <g> <path d="M204.8,0 L256,0 L128,220.8 L0,0 L50.56,0 L97.92,0 L128,51.2 L157.44,0...
7,494
0
petrpan-code/learnapollo/learnapollo/src/assets
petrpan-code/learnapollo/learnapollo/src/assets/icons/logo.svg
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg width="256px" height="256px" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <!-- Generator: Sketch 40.1 (33804) - http://www.bohemiancoding.com/sketch --> <title>logo</title> <desc...
7,495
0
petrpan-code/learnapollo/learnapollo/src/assets
petrpan-code/learnapollo/learnapollo/src/assets/icons/next.svg
<?xml version="1.0" encoding="utf-8"?> <!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="11px" height="20px" viewBox="0 0 11 20" style="enab...
7,496
0
petrpan-code/learnapollo/learnapollo/src/assets
petrpan-code/learnapollo/learnapollo/src/assets/icons/previous.svg
<?xml version="1.0" encoding="utf-8"?> <!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="11px" height="20px" viewBox="0 0 11 20" style="enab...
7,497
0
petrpan-code/learnapollo/learnapollo/src/components
petrpan-code/learnapollo/learnapollo/src/components/App/App.module.styl
.sidebar z-index 5 background #fff @media (min-width: 740px) display flex !important @media (max-width: 739px) width 100% !important &:before content "" width 2px height 100% position absolute right 0 background rgba(0,0,0,0.1) .layoverPadding margin-bottom: 350px .cont...
7,498
0
petrpan-code/learnapollo/learnapollo/src/components
petrpan-code/learnapollo/learnapollo/src/components/App/App.tsx
import * as React from 'react' import * as Helmet from 'react-helmet' import * as classNames from 'classnames' import {Link, withRouter} from 'react-router' import {throttle} from 'lodash' import { Icon } from 'graphcool-styles' import ServerLayover from '../ServerLayover/ServerLayover' import {chapters, neighboorSubch...
7,499