Coder Social home page Coder Social logo

gqlfetch's Introduction

Hi

NZ based software engineer studying for a Masters in CS @ The University of Auckland. I carry quite a bit of interest in Go, with particular focus on projects such as bramble, graph-gophers, genqlient, gqlgen, right now. Currently learning a little more about PostgresQL, with particular focus on extensions like pg_trgm, postgres_fdw and pg_roaringbitmap.

Other interests include; tackling scalability problems, debating software architectures, recommender systems via matrix factorization, using nvim, (py)spark alternatives like dask.

I like to document my learnings in the forms of small problem-centric projects, please check them out!

You'll see me hanging out on math stack exchange and stack overflow occasionally too.

gqlfetch's People

Contributors

alwxsin avatar dekimsey avatar oatovar avatar suessflorian avatar ynng avatar

Stargazers

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

Watchers

 avatar  avatar

gqlfetch's Issues

BUG, Extra square brackets

Additional square brackets

  • [WorkPartition]! -> [[[WorkPartition]!]]!
  • ID! -> [ID]!

However non-required fields are ok

Double quotes in comments cause errors

If a field comment ends with double quotes, it causes issues.

type {
"""Comment with "double quotes""""
  id: ID
}

This was automatically generated fetching a public schema.
I believe we need to use """ as proper multi-lines to make this work

error: No query string was present

Hi there,

I keep getting this error from the server and upon further inspection this happens because the query operation type is being sent as uppercase Query

{"Query":"query IntrospectionQuery {\n __schema {\n...

Server returns

{
  "errors": [
    {
      "message": "No query string was present"
    }
  ]
}

the query works fine if operation type is sent as: query

{"query":"query IntrospectionQuery {\n __schema {\n...


I'll be happy to submit a PR if needed, but it is such a minor change might just be easier for you guys to commit the change.

I couldn't find anything on wether the spec requires this to be uppercase or lowercase but from my experience I have always seen the operation types being sent lowercase. They are also shown lowercased in the spec.

Built in types and directives

At this moment gqlfetch prints all types and directives fetched from a server. Problem is that build in types and directives are also printed which conflicts with genclient when I tried to generate code with error like

invalid schema file ./schema.graphql: Cannot redeclare type Float.

Interface arguments are not generated

Description

If an interface field has arguments, they will not be generated. This causes errors when using the exported schema in genqlient.

Steps to reproduce

  1. Create a new go project
    $ mkdir sample-gengqlient-project
    $ cd sample-genqlient-project
    $ go mod init sample-genqlient-project
  2. Run go install github.com/suessflorian/gqlfetch/gqlfetch@latest
  3. Run gqlfetch --endpoint https://gitlab.com/api/graphql > schema.graphql
  4. Run go run github.com/Khan/genqlient@latest --init and observe that the it is unable to init the project because of the interface and implementation argument mismatch.

What license is this project released under?

Description

I'm looking at using this project, but I'm unable to do so at the moment without a software license. Is the project intended to be used under a specific license?

From the GitHub docs.

You're under no obligation to choose a license. However, without a license, the default copyright laws apply, meaning that you retain all rights to your source code and no one may reproduce, distribute, or create derivative works from your work.

Empty inputs

Hey @suessflorian, thanks for the tool.

I fetched schema and found that all inputs are empty, no fields specified

input UpdateWorkTemplateInput {
}

If I want to use schema for genqlient I need inputs, so genclient can generate proper code.

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.