Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn about duplicate function names #657

Open
1 of 3 tasks
btilly opened this issue Feb 22, 2020 · 2 comments
Open
1 of 3 tasks

Warn about duplicate function names #657

btilly opened this issue Feb 22, 2020 · 2 comments

Comments

@btilly
Copy link

btilly commented Feb 22, 2020

I'm submitting a ...

  • bug report
  • feature request
  • question

PostGraphile version: 4.5.4

Minimal SQL file that can be loaded into a clean database:

CREATE OR REPLACE FUNCTION graphql.replace_time_series_range(
    a bigint, b bigint
) RETURNS bigint
LANGUAGE 'plpgsql'
VOLATILE
AS $BODY$
BEGIN
    return a + b;
END;
$BODY$;

Steps to reproduce:

I am running the CLI. Here is the command line (modulo environment variables).

postgraphile --plugins '@graphile/pg-pubsub' --connection $CONNECT_STRING --schema $PG_SCHEMA --port $PORT --subscriptions --simple-subscriptions --subscription-authorization-function model.validate_subscription --no-ignore-rbac --append-plugins 'postgraphile-plugin-connection-filter,@graphile-contrib/pg-simplify-inflector'

Current behavior:

The mutation "replaceTimeSeriesRange" does not show up. If I rename the function to "set_time_series_range" it does show up as "setTimeSeriesRange".

Expected behavior:

I expect "replaceTimeSeriesRange" to show up as a mutation.

@btilly
Copy link
Author

btilly commented Feb 22, 2020

Ugh. There were two functions with the same name so it picked up neither.

A warning about that at startup would be nice...

@btilly btilly closed this as completed Feb 22, 2020
@benjie benjie reopened this Feb 22, 2020
@benjie benjie changed the title Custom mutation weird naming restriction Warn about duplicate function names Feb 22, 2020
@benjie benjie transferred this issue from graphile/crystal Sep 9, 2020
@benjie
Copy link
Member

benjie commented Sep 28, 2023

This is still an issue in V5.

@benjie benjie added this to V5.0.0 Oct 4, 2023
@github-project-automation github-project-automation bot moved this to 🌳 Triage in V5.0.0 Oct 4, 2023
@benjie benjie moved this from 🌳 Triage to 🦟 Mayfly in V5.0.0 Oct 4, 2023
@benjie benjie removed this from V5.0.0 Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants