Giter Club home page Giter Club logo

labs's Introduction

Netlify Labs

Documentation and samples for features released through Netlify Labs


Note: The content in this repository is deprecated. To access up-to-date documentation and provide feedback on features in Netlify Labs, visit the Labs section of the Netlify docs.


Netlify Labs gives you early access to new features before they’re available to everyone. We welcome your feedback, and we encourage you to join the Netlify research program to help us continuously improve the platform. Experimental features are works-in-progress, so you may find some bugs along the way.

Features currently in Labs

Features graduated from Labs

labs's People

Contributors

ceccode avatar dend avatar dwwoelfel avatar erezrokah avatar jasonbarry avatar jmarlena avatar kyleblankrollins avatar localden avatar maxcell avatar metalmatt-netlify avatar minivan avatar rstavchansky avatar zaiste avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

labs's Issues

Immediate issue with Spotify authentication

When trying to add Spotify to Netlify Graph, I entered a client id and secret for an app I had built a few months ago. When I tried to enable it in the Netlify dashboard I got:

INVALID_CLIENT: Invalid redirect URI

In the pop up window. So maybe my Spotify app has settings where the id/secret won't work, but how do I know what should be set there? So for example, do I need to make a new app in the Spotify dashboard and use a Netlify specific redirect url? If so - where do I get it?

Issue with auth failing randomly

I added auth for Spotify and designed a query. I then exported the handler. When I test, it runs right about half the time, and then the other half gives me an error:

Missing auth for Spotify. Please reauthenticate.

There seems to be no rhyme nor reason for it going back and forth like that.

netlify graph env variable doesn't exist in production deploy

Steps to reproduce:

  • Enable Netlify graph
  • Enable spotify API & authenticate
  • try in local dev environment netlify dev --graph , everything works
  • try netlify build , after deployment finishes, try in prod URL then it gives bad request errors because ONEGRAPH_AUTHLIFY_TOKEN is missing.

Incorrect Import for 'buffer'

I'm currently building a Remix app which uses esbuild. I'm having an issue using the generated netlifyGraph/index.js file because there is no default export for the 'buffer' core node module and the esbuild polyfills have a problem with that.

✘ [ERROR] No matching export in "node-modules-polyfills:buffer" for import "default"

    netlify/functions/netlifyGraph/index.js:2:7:
      2 │ import buffer from 'buffer'
        ╵        ~~~~~~

The problem is fixed by making the following change:

// GENERATED VIA NETLIFY AUTOMATED DEV TOOLS, EDIT WITH CAUTION!
- import buffer from 'buffer'
+ import * as buffer from 'buffer'
import crypto from 'crypto'
import https from 'https'
import process from 'process'

This solution works for the time being, but I have to remember to re-apply the change whenever I make a change to a query through the graph explorer which can be annoying.

Thanks for all the work!

Unable to fetch enabled services for site for code generation

Tried a setup with Contentful but immediately ran into an issue.

Steps to reproduce:

  1. Created site in Netfily using nextjs template.
  2. In Netlify under graph enabled content ful api
  3. Cloned repo locally
  4. Ran npm install
  5. Ran npm install netlify-cli -g
  6. Ran netlify link and selected site
  7. Ran netlify dev --graph
  8. Error "Warning: Unable to fetch enabled services for site for code generation" repeats and session never appears in Netlify.

Unable to fetch services

Exported filename didn't match query name

When I first exported, I noticed it used the name of my query for the file name (ExampleQuery.js I believe). I renamed my query, saved, exported again, and the filename didn't change. I navigated away from the editor, and back in, exported again, and it worked right.

No environment variables created after authenticating with an API (Netlify Graph - API Authentication)

I was following along with the documentation for Netlify Graph here

Under the Getting Started section, after connecting to one of the providers (Spotify) and authenticating with it, I had no new environment variables created (after checking Settings > Build & Deploy > Environment), although I'm certain I've completed all steps directly.

Are there additional steps I need to take not written in the documentation?

Use node-based implementation for Spotify provider

Summary

When working through our Spotify example, I came across this documentation on the spotify-web-api-js:

It doesn't have any dependencies and supports callbacks and promises. It is intended to be run on a browser, but if you want to use Node.JS to make the requests, please check spotify-web-api-node.

and it turns out we don't want to use the browser based implementation of Spotify library. When I tried to use it, it completely failed. Instead we should point folks over to the spotify-web-api-node project instead. https://github.com/thelinmichael/spotify-web-api-node

Action Items:

Grammar error in readme.md

grammar error in the readme.md, title "Table of contents" subtitle "queries, mutatations..." doubling "ta"

Incorrect sample code in Netlify Graph Explorer web interface

The Netlify Graph Explorer shows a code snippet for our queries, mutations, etc. It currently shows the incorrect method for Mutations, netlifyGraph.fetchExampleMutation.

Screen Shot 2022-02-26 at 18 56 34

The code from "Generate Handler" action has the correct method, netlifyGraph.executeExampleMutation.

Netlify Graph/Netlify CLI logging into 1 account and opens a Netlify UI session in another account

I experienced an issue where I did not realize in my netlify cli I was logged in with one email and then in the Netlify UI, I was logged in as a different user with a different email. When I opened up a session in my terminal and clicked the link to go to the UI session in the browser it would just cause a blank session page with no GraphQL IDE.

@sgrove Helped me figure this out and I switched to the correct email login and it fixed. The error message was not clear on what the issue was. Thanks again Sean!

scheduled function not running

I've followed all the steps of enabling and my function is deployed with a next run timestamp

However, the logs are always empty

I'm using javascript with an in-line schedule (note: the screenshot says hourly but I increased the cron to minutely for the purpose of testing)

Screen Shot 2022-02-05 at 4 20 52 PM

Screen Shot 2022-02-05 at 4 21 27 PM

Scheduled Function timeout

I'm trying this new Netlify featured "Scheduled Function".

But all my functions timed out on 10seconds. Can i increase this timeout?

[security] Enforce Branch Protections

This is an issue generated by (for-internal-use-only)github-tools

Description

This repository has exceeded the development grace period, and the repo owner must decide if branch protections should be enforced.
If this repository houses code used in production in any capacity, branch protections must be enforced. Read (for-internal-use-only)here for more details

What do I need to do?

  • You can control whether or not branch protections are enforced by exclusively creating either of the labels:
    'enforce-branch-protections: true' or 'enforce-branch-protections: false'
  • If there is no branch protection control label, this issue will be recreated.
  • Once you have created either label, you can close this issue.
  • If you have issues or questions, please reach out to #internal-security-n-compliance on slack.

[question] Can Graph Authentication be used for multiple-user accounts?

Love the possibilities the Graph project is opening up and am excited to see how it develops.

Will Graph Authentication allow connecting to APIs and managing tokens for multiple user accounts?

For example - a Salesforce plugin app that users connect to their accounts that then maintains required auth to access and update their individual accounts?

Scheduled Functions not running when deployed from Netlify-CLI

When I build and deploy from the cli using netlify deploy -p Scheduled Functions are not recognized. (they don't have the "Scheduled" badge in the Functions GUI and they do not run)

They run fine using the same code and configuration if I build automatically from Git or if I trigger a deploy from the Netlify GUI.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.