profile
viewpoint

netguy204/cljs-bench 10

Runs benchmarks against a range of Clojurescript versions and reports the results

netguy204/1MonthLispGame 6

TB Tanks! My International Lisp Games Expo Entry

netguy204/clojure-gl 5

clojure opengl quick project

netguy204/brianscheme 4

An attempt at building a bootstrapped scheme

netguy204/bucketlogs 4

Python library/tool to fetch, parse, and optionally display your s3 bucket logs.

netguy204/.emacs.d 3

My personal .emacs.d

netguy204/BetaInvaders 3

"Invaders" for the Digispark Pro Beta Board

agquick/quick_script 2

Web Application Framework

netguy204/cappuccino 2

maintaining ubuntu support

agquick/quick_script.js 1

Web Application Javascript Framework based on Knockout JS

push eventcntools/libsurvive

Justin

commit sha 027e99a49d255b4a4f63dcd792e5490e11079afa

Added test exclusions

view details

push time in 8 hours

push eventcntools/libsurvive

Justin Berger

commit sha 66715c98af0483bd02dfbca25123b770046b7224

Added code for windows to copy over blas stuff

view details

jdavidberger

commit sha bedba13810dcfc37a3cb035d853edb98a0c3e1ee

Create cmake.yml

view details

Justin

commit sha 24f97a02341943464b12d667dbd623168f9d6568

Invert logic for gzvprintf detection

view details

Justin

commit sha dc84d7b56319bb2b78125c74f45f08fd79746632

Disable light-error-for-lh-confidence by default

view details

push time in 15 hours

startednetguy204/roku_media_server

started time in a day

push eventcntools/libsurvive

Justin

commit sha 59caddec8dc9645c5f1da25afa29081404627edf

Adjust tolerance for gen1/gen2 detection

view details

Justin

commit sha 1b99af23f89c281ae4911bffddb3165ffc4bcf0d

Added velocity; fixs to python bindings

view details

Justin

commit sha 24f9294b1b0f3de2bf55ffa3cf97b0d05b6826c9

Check unique axis cnt in solver

view details

push time in 4 days

startedjameslzhu/riscv-card

started time in 4 days

pull request commentgraph-gophers/graphql-go

DisableIntrospection should not skip __typename

In the official implementation graphql-js, when introspections are disabled, the __typename field is still valid, see https://github.com/graphql/graphql-js/blob/master/src/validation/tests/NoSchemaIntrospectionCustomRule-test.js#L33

describe('Validate: Prohibit introspection queries', () => {
  it('ignores valid fields including __typename', () => {
    expectValid(`
      {
        someQuery {
          __typename
          someField
        }
      }
    `);
  });
Epsirom

comment created time in 5 days

PR opened graph-gophers/graphql-go

DisableIntrospection should not skip __typename

__typename is defined in GraphQL spec 4.4, but when we use union types, the __typename field is usually used for differentiating different data types from each other on the client.

It is safe to expose the __typename field when DisableIntrospection because attackers can not get the type fields with __typename.

+45 -7

0 comment

2 changed files

pr created time in 7 days

startedmikesart/gpuvis

started time in 7 days

push eventcntools/libsurvive

Justin

commit sha 4e57a68895428c5ab61e620f00e396149d02cb7d

Fix for windows

view details

push time in 7 days

push eventcntools/libsurvive

Justin

commit sha 137cf2c9d4069024020df7f936440cd46c02abf7

Remove bad printf

view details

push time in 8 days

push eventcntools/libsurvive

Justin

commit sha 09642ea5d043705cbd13fcef64716279abbef928

Fixed time rollover; time for API is in seconds

view details

Justin

commit sha a8643eb33a4be3c9dc9ae18fa6de2c124ce7cb40

Fixed race condition in config section

view details

push time in 8 days

pull request commentgraph-gophers/graphql-go

Fixed union inline fragments

Thank you for taking care of that guys, it's tough for me to find any time for finalizing my opensource contributions. Great to see my changes finally adopted!

pzduniak

comment created time in 11 days

Pull request review commentgraph-gophers/graphql-go

Added possibility to explore the actual field selection tree

 type SchemaField struct { 	FixedResult reflect.Value } +func (f *SchemaField) Kind() selected.Kind {+	return selected.FieldKind+}++func (f *SchemaField) Identifier() string {

Couldn't use Name() method here yet since the backing internal/exec/selected/*SchemaField already has a field Name so it conflicts.

At one point, if we all agree on the feature and the interface, I suggest the internal field changes to the interface looks better.

This is the same reasoning for Aliased below.

maoueh

comment created time in 11 days

pull request commentgraph-gophers/graphql-go

Added possibility to explore the actual field selection tree

The use case we have right now is to explore the type assertion provided by the user, like in the starwars search query:

query {
  search(text:\"C-3PO\") {
    ... on Droid { name } 
    ... on Starship { name }
  }
}

We use the elements as a "filter" in our backend so we do not search for everything, only for what was requested by the user.

maoueh

comment created time in 11 days

Pull request review commentgraph-gophers/graphql-go

Added possibility to explore the actual field selection tree

+package selected++import (+	"fmt"+)++type Kind int++func (k Kind) String() string {+	switch k {+	case FieldKind:+		return "field"+	case TypeAssertionKind:+		return "type_assertion"+	case TypenameFieldKind:+		return "typename_field"+	default:+		panic(fmt.Errorf("invalid kind %d received", k))+	}+}++const (+	FieldKind Kind = iota+	TypeAssertionKind+	TypenameFieldKind+)++type Selection interface {+	Kind() Kind+}++type Field interface {+	Selection+	Identifier() string+	Aliased() string+	Children() []Selection+}++type TypeAssertion interface {+	Selection+	Type() string+	Children() []Selection+}++type TypenameField interface {+	Selection+	Type() string+	Aliased() string+}++func Dump(selection Selection) {

This is also present mainly for debugging/exploration purposes, another method that could be removed.

maoueh

comment created time in 11 days

Pull request review commentgraph-gophers/graphql-go

Added possibility to explore the actual field selection tree

 package starwars  import (+	"context"

I do not intend to ship that if the feature is merged, it will be removed.

maoueh

comment created time in 11 days

Pull request review commentgraph-gophers/graphql-go

Added possibility to explore the actual field selection tree

 package starwars  import (+	"context"

Changes here are just for demonstration purposes if someone wants to play with the feature a bit. To try it out, run the starwars example server and perform this curl call:

curl 'http://localhost:8080/query' -d '{"query":"query {search(text:\"C-3PO\") {... on Droid {name} ... on Starship {name}}}","variables":null}'
maoueh

comment created time in 11 days

Pull request review commentgraph-gophers/graphql-go

Added possibility to explore the actual field selection tree

+package graphql++import (+	"context"++	gcontext "github.com/graph-gophers/graphql-go/internal/context"+	"github.com/graph-gophers/graphql-go/selected"+)++type Context struct {+	Field selected.Field+}++// GraphQLContext is used to retrieved the graphql from the context. If no graphql

Wrong comment

maoueh

comment created time in 11 days

PR opened graph-gophers/graphql-go

Added possibility to explore the actual field selection tree

Added possibility to explore the actual field selection tree, this is attached to the context that the resolver method receive. I'm opening this to gather feedback about this new feature.

Each resolver's context will now be able to access through the graph of elements that were selected as part of the execution of this resolve via the standard go context's value.

The returned field is an interface representing a subset of the functionality of the internal/exec/selected package, enough for the developer to know what was queried by the user.

I'm opening the PR to start a discussion about offering this feature to end user of the library. We have started using it in our own fork of the library.

Design

This introduces new API interfaces the would become part of the standard library.

The interface is currently a simple wrapper around elements of internal/exec/selected/Selection interface needed to "walk" the selected field. Hopefully, I got the structure right.

I've currently used Identifier() instead of Name() and Aliased() instead of Alias to not renamed the field's name since there would be conflict with struct fields in the internal/exec/selected/Selection package. If we agree, the internal struct could change so the interface has the best name.

A future addition that I forsee could be:

  • A "path" retrieval syntax "a la" gjson to quickly extract some nodes of the selection, for example with the star wars element ".search[]" that would return all type assertion nodes below the search field. Exact semantic to be discussed.
  • Maybe a visitor pattern to ease the walking of the selection tree.
+236 -4

0 comment

7 changed files

pr created time in 11 days

pull request commentgraph-gophers/graphql-go

Added possibility to propagate subscription error properly

I am not convinced that this should be part of the library. You can have your errors treated as data and have them in your schema resolver as fields. For example you might return an option error field. Which in turn might have a subfield isTerminal or something like this. I'm not 100% convinced that I want this to be part of the library. What exactly in the current implementation is limiting you? Why can't you terminate the subscription with the current implementation?

maoueh

comment created time in 11 days

PR closed graph-gophers/graphql-go

Fixed union inline fragments

This fixes #241. I haven't fully understood the problem yet, so no tests are present. I adopted code from https://github.com/graph-gophers/graphql-go/issues/241#issuecomment-406877915, modifying it to support the scenario in that issue. I did not remove the original comparsion added by @marksauter, I don't know what was the scenario that broke his code.

I'm casting the "fragment type" as an interface, if it works then I look into its possible types and check if there's a TypeAssertion for that interface. I think that's OK? I'll write tests for this patch if you think this is fine.

+22 -1

5 comments

1 changed file

pzduniak

pr closed time in 11 days

pull request commentgraph-gophers/graphql-go

Fixed union inline fragments

Thank you for your contribution. I'm closing this in favour of #409 because it has tests as well.

pzduniak

comment created time in 11 days

push eventgraph-gophers/graphql-go

Quinn Slack

commit sha 5b0cad13c3fd2b567a8c0a8a17792757a918326a

fix #241 Similar to https://github.com/graph-gophers/graphql-go/pull/407, but adds test cases.

view details

Quinn Slack

commit sha 653514dff4841b9809b65b90edb1888c1d9334fe

handle case where interface is type-asserted to same interface

view details

Pavel Nikolov

commit sha beb923fada293249384c7a9fa0c5078ea92466f3

Merge pull request #409 from sourcegraph/fix-union-interface-inline-fragments fix #241

view details

push time in 11 days

PR merged graph-gophers/graphql-go

fix #241

Similar to https://github.com/graph-gophers/graphql-go/pull/407, but adds test cases.

fix #241

+164 -17

1 comment

5 changed files

sqs

pr closed time in 11 days

issue closedgraph-gophers/graphql-go

Interface inline fragment on union types results in panic.

Error

Given:

interface Node {
  id: ID!
}

type A implements Node {
  id: ID!
  a: String!
}

type B implements Node {
  id: ID!
  b: String!
}

type C implements Node {
  id: ID!
  c: String!
}

union ABC = A | B | C

query {
  search(input: InputType!): ABC
}

If I make the following query to this mock api:

{
  search(input: { ... }) {
    ... on A {
      a
    }
    ... on B {
      b
    }
    ... on C {
      c
    }
    ... on Node {
      id
    }
  }
}

I get a panic error that Node does not implement ABC, originating from the following line of code: https://github.com/graph-gophers/graphql-go/blob/bb9738501bd42a6536227b96068349b814379d6e/internal/exec/selected/selected.go#L170

Expected

I expect the Node inline fragment to resolve just fine, because A) relay makes queries of this nature via its api, and B) each type in the union implements the Node interface.

Probable source of the error

Looking through the code I can see - correct me if I'm wrong - that the type assertion is only checking for possible types for the union. It is not checking if A) the inline fragment is an interface type, or if B) the union objects implement said interface.

Update

I've decided to just make all my union types into interface types for the time being.

closed time in 11 days

marksauter

pull request commentgraph-gophers/graphql-go

fix #241

I'm merging this PR because it has tests. I'll close the other one. Thank you for your effort.

sqs

comment created time in 11 days

push eventgraph-gophers/graphql-go

suntoucha

commit sha 4fe2a6b175a0cac805386b97db077c1dda4302ff

Issue #299: unclear error message in case of multiline string argument

view details

suntoucha

commit sha fff3ceb9e3dd7c2bbde9efd3015ed2a345087dc7

Issue #299: unclear error message in case of multiline strings

view details

suntoucha

commit sha 43e20d2ff6330a1f8b9279eee11d1822be5c0ae4

Issue #299: unclear error message in case of multiline string argument

view details

suntoucha

commit sha cd7bafde382e067b0f495130e6c2990a374cdd84

Issue 299: unclear error messages in case of multiline strings

view details

suntoucha

commit sha 4af9f1678ad25f4693a7a8b549f4c60998fa6d68

Adding/removing empty lines where needed

view details

Pavel Nikolov

commit sha 9c36bbaee155784dea80753dd217699ef2e59cf0

Merge pull request #412 from suntoucha/master Issue #299: unclear error message in case of multiline string argument

view details

push time in 11 days

PR merged graph-gophers/graphql-go

Issue #299: unclear error message in case of multiline string argument

Fix #299

Package text/scanner, which is used to parse queries, already detects multiline strings as an error. But it only puts log message to console, as it was pointed in the issue description. Scanner can also call a function each time it encounters error

So the idea of the fix is:

  • provide Scanner a function to catch errors
  • generate high-level errors in that function
  • couple of tests
+48 -1

2 comments

2 changed files

suntoucha

pr closed time in 11 days

more