How to use where clause in Knex
Create refunds with Stripe
Load HTML with Cheerio
How to send POST request with Axios
Find intersection of array in Lodash
Powered by Official white Bloop logo with a period

Terms / Privacy / Search / Support

  • import { ApolloServer } from "apollo-server";
    import { ApolloServerPluginUsageReporting } from "apollo-server-core";
    
    const server = new ApolloServer({
      typeDefs,
      resolvers,
      plugins: [
        // Sets a non-default option on the usage reporting plugin
        ApolloServerPluginUsageReporting({
          sendVariableValues: { all: true },
        }),
      ],
    });
    Docs
  • import { ApolloServer } from "apollo-server";
    import { ApolloServerPluginLandingPageLocalDefault,
             ApolloServerPluginLandingPageProductionDefault
    } from "apollo-server-core";
    
    const server = new ApolloServer({
      typeDefs,
      resolvers,
      plugins: [
        // Install a landing page plugin based on NODE_ENV
        process.env.NODE_ENV === 'production'
          ? ApolloServerPluginLandingPageProductionDefault({
              graphRef: "my-graph-id@my-graph-variant",
              footer: false,
            })
          : ApolloServerPluginLandingPageLocalDefault({ footer: false }),
      ],
    });
    Docs
  • import { ApolloServerPluginCacheControl } from 'apollo-server-core';
    
    new ApolloServer({
      plugins: [
        ApolloServerPluginCacheControl({
          defaultMaxAge,
          calculateHttpHeaders,
        }),
      ],
    })
    Docs
  • import { ApolloServer } from "apollo-server";
    import { ApolloServerPluginCacheControl } from "apollo-server-core";
    
    const server = new ApolloServer({
      typeDefs,
      resolvers,
      plugins: [
        ApolloServerPluginCacheControl({
          // Cache everything for 1 second by default.
          defaultMaxAge: 1000,
          // Don't send the `cache-control` response header.
          calculateHttpHeaders: false,
        }),
      ],
    });
    Docs
  • import { ApolloServerPluginCacheControl } from 'apollo-server-core';
    
    const server = new ApolloServer({
      typeDefs,
      resolvers,
      // The max age is calculated in seconds
      plugins: [ApolloServerPluginCacheControl({ defaultMaxAge: 5 })],
    });
    Docs
  • Powered by Official black Bloop logo with a period
    download the IDE extension

    View other examples